Handle groovy arraylist to java array