CodenameOne icon indicating copy to clipboard operation
CodenameOne copied to clipboard

Missing runtime methods

Open ddyer0 opened this issue 4 years ago • 2 comments

This construct Arrays.copyOf(colorIndex) gets an error at runtime. It's very upsetting that there is no compile time complaint, so this lurks are a latent bomb in code.

In this case, colorIndex is int[], but I believe the same will be true for all the base types.

java.lang.NoSuchMethodError: java.util.Arrays.copyOf([I)[I at online.shared.SeatingViewer.prepareLaunch(SeatingViewer.java:177)

ddyer0 avatar Jul 04 '21 17:07 ddyer0

Is this on iOS?

shannah avatar Sep 02 '21 12:09 shannah

This happens in the simulator - it never made it into the actual builds. Just stick this anywhere it will be executed

            int ar[] = new int[100];
	int ar2[] = Arrays.copyOf(ar);

java.lang.NoSuchMethodError: 'int[] java.util.Arrays.copyOf(int[])' at online.common.SeatingViewer.prepareLaunch(SeatingViewer.java:203) at online.common.SeatingViewer.StopDragging(SeatingViewer.java:280)

ddyer0 avatar Sep 02 '21 17:09 ddyer0