Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
Patch Available
Description
When running Geronimo Unit Tests v2.0.2, the following exception occurs:
java.lang.RuntimeException: Could not access java.util.EnumSet.elementType field
at com.thoughtworks.xstream.core.util.Fields.find(Fields.java:18)
at com.thoughtworks.xstream.converters.enums.EnumSetConverter.<init>(EnumSetConverter.java:31)
at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java)
Here's the simple code to reproduce:
public class Test {
public static void main(String[] args) {
try
catch (Exception e)
{ e.printStackTrace(System.out); } }
}
Output on RI:
SUCCESS: final java.lang.Class java.util.EnumSet.elementType
Output on Harmony:
java.lang.NoSuchFieldException: elementType
at java.lang.Class.getDeclaredField(Class.java:373)
at Test.main(Test.java:4)
Clearly enough, the mentioned field is package private, it's not covered by the spec, and probably it contains the element type of the EnumSet.
Addressing such a field in an application is clearly a bug, and it should be reported to XStream developers (http://xstream.codehaus.org).
However, as this issue occurred, I think it worths to behave compatibly. Harmony implementation of EnumSet has elementClass field that seems to be the equivalent of RI's elementType field. So my suggestion is to rename elementClass to elementType and thus become more compatible and move GUT v2.0 enabling forward.
Attachments
Attachments
Issue Links
- is related to
-
HARMONY-5199 [drlvm][kernel] final fields cannot be set accessible
- Closed
-
HARMONY-5224 [buildtest][gut] Geronimo Unit Tests update to v2.0.2
- Closed