-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
5.0
-
x86
-
windows_2000
Tiger PIT build30 (build 1.5.0-auto-tiger-322c) os: win2000
-------------------------------------------------------------
java.lang.reflect.Field isEnumConstant() not returning correct values.
output is false in the following:
(expected output is true)
Colour02.RED isEnumConstant() = false
Colour02.BLUE isEnumConstant() = false
Colour02.GREEN isEnumConstant() = false
Colour02.WHITE isEnumConstant()= false
The java version used, output of the test program and test program is given below:
java version
-------------
java version "1.5.0-auto-tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-auto-tiger-322c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b28, mixed mode)
Test program output:
-------------------
D:\testing\lang\reflect\IsEnumConstantTest>java IsEnumConstantTest
fArray.length = 5
fArray.[0]= public static final Colour02 Colour02.RED isEnumConstant() = false
fArray.[1]= public static final Colour02 Colour02.BLUE isEnumConstant() = false
fArray.[2]= public static final Colour02 Colour02.GREEN isEnumConstant() = false
fArray.[3]= public static final Colour02 Colour02.WHITE isEnumConstant()= false
fArray.[4]=private static final Colour02[]Colour02.$VALUES isEnumConstant() = false
Test program:
------------
import java.lang.reflect.*;
public class IsEnumConstantTest {
public static void main(String[] args) throws Exception {
//isEnumConstant()
Field [] fArray = Colour02.class.getDeclaredFields();
System.out.println("fArray.length = " + fArray.length);
for (int i = 0; i < fArray.length; i++) {
System.out.println("fArray.[" + i + "]= " + fArray[i] + " isEnumConstant() = " + fArray[i].isEnumConstant());
}
}
}
enum Colour02 { RED,BLUE,GREEN,WHITE,}
###@###.### 2003-11-30
-------------------------------------------------------------
java.lang.reflect.Field isEnumConstant() not returning correct values.
output is false in the following:
(expected output is true)
Colour02.RED isEnumConstant() = false
Colour02.BLUE isEnumConstant() = false
Colour02.GREEN isEnumConstant() = false
Colour02.WHITE isEnumConstant()= false
The java version used, output of the test program and test program is given below:
java version
-------------
java version "1.5.0-auto-tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-auto-tiger-322c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b28, mixed mode)
Test program output:
-------------------
D:\testing\lang\reflect\IsEnumConstantTest>java IsEnumConstantTest
fArray.length = 5
fArray.[0]= public static final Colour02 Colour02.RED isEnumConstant() = false
fArray.[1]= public static final Colour02 Colour02.BLUE isEnumConstant() = false
fArray.[2]= public static final Colour02 Colour02.GREEN isEnumConstant() = false
fArray.[3]= public static final Colour02 Colour02.WHITE isEnumConstant()= false
fArray.[4]=private static final Colour02[]Colour02.$VALUES isEnumConstant() = false
Test program:
------------
import java.lang.reflect.*;
public class IsEnumConstantTest {
public static void main(String[] args) throws Exception {
//isEnumConstant()
Field [] fArray = Colour02.class.getDeclaredFields();
System.out.println("fArray.length = " + fArray.length);
for (int i = 0; i < fArray.length; i++) {
System.out.println("fArray.[" + i + "]= " + fArray[i] + " isEnumConstant() = " + fArray[i].isEnumConstant());
}
}
}
enum Colour02 { RED,BLUE,GREEN,WHITE,}
###@###.### 2003-11-30