Relates :
|
|
Relates :
|
|
Relates :
|
JavaCard does not support clone() for arrays, which causes problems for enums. It would be nice if javac could generate different code for the values() method that does not rely on array.clone(). For example, replace the following: public static Color[] values() { return (Color[]) $VALUES.clone(); } with this: public static Color[] values() { Color[] copy = new Color[$VALUES.length]; System.arraycopy($VALUES, 0, copy, 0, $VALUES.length); return copy; }
|