groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kunz <>
Subject Unexpected byte[] parameter conversion when calling java method
Date Fri, 20 Oct 2017 07:51:01 GMT

I'm having problems calling a Java method call(byte[]... data) from
groovy 2.4.12.
I'm trying to call it with a single byte[] value from groovy like this:
byte[] data = [0,1,2,3,4,5,6,7]

I was expecting to receive a byte[][] data = {{0,1,2,3,4,5,6,7}} in Java
but instead have a split array of the form byte[][] data =
{{0},{1},{2},{3},{4},{5},{6},{7}} which doesn't make sense to me.
A full example is available at

What is the expected behaviour and why? Can I change the Java method
signature in a way so that the arrays are preserved?

Regards, Michael

View raw message