Fixed Java API to receive array, not object