8155103: [TEST_BUG] @BeanProperty: unwanted "declaringClass" descriptor when annotating an enum
Reviewed-by: ssadetsky, alexsch, avstepan
This commit is contained in:
parent
18cecf9f67
commit
a73a3830ee
@ -38,8 +38,6 @@ import java.util.Arrays;
|
|||||||
* @author a.stepanov
|
* @author a.stepanov
|
||||||
* @run main BeanPropertyTest
|
* @run main BeanPropertyTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public class BeanPropertyTest {
|
public class BeanPropertyTest {
|
||||||
|
|
||||||
private final static String DESCRIPTION = "TEST";
|
private final static String DESCRIPTION = "TEST";
|
||||||
@ -853,8 +851,7 @@ public class BeanPropertyTest {
|
|||||||
public void removePropertyChangeListener(PropertyChangeListener l) {}
|
public void removePropertyChangeListener(PropertyChangeListener l) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// JDK-8155103
|
public enum E {
|
||||||
public static enum E {
|
|
||||||
|
|
||||||
ONE,
|
ONE,
|
||||||
TWO {
|
TWO {
|
||||||
@ -889,7 +886,7 @@ public class BeanPropertyTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static enum EB {
|
private enum EB {
|
||||||
|
|
||||||
TRUE(true), FALSE(false);
|
TRUE(true), FALSE(false);
|
||||||
|
|
||||||
@ -1064,9 +1061,7 @@ public class BeanPropertyTest {
|
|||||||
// enums
|
// enums
|
||||||
|
|
||||||
Class<?> enumCases[] = {
|
Class<?> enumCases[] = {
|
||||||
|
E.class, E.TWO.getClass(), EB.class
|
||||||
// TODO: uncomment/update after 8155103 fix
|
|
||||||
//E.class, E.TWO.getClass(), EB.class
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int ne = 1;
|
int ne = 1;
|
||||||
@ -1076,7 +1071,7 @@ public class BeanPropertyTest {
|
|||||||
ne++;
|
ne++;
|
||||||
|
|
||||||
BeanInfo i;
|
BeanInfo i;
|
||||||
try { i = Introspector.getBeanInfo(c, Object.class); }
|
try { i = Introspector.getBeanInfo(c, Enum.class); }
|
||||||
catch (IntrospectionException e) { throw new RuntimeException(e); }
|
catch (IntrospectionException e) { throw new RuntimeException(e); }
|
||||||
boolean ok = checkInfo(i, !ignoreVals(c));
|
boolean ok = checkInfo(i, !ignoreVals(c));
|
||||||
System.out.println(ok ? "OK" : "NOK");
|
System.out.println(ok ? "OK" : "NOK");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user