From a73a3830ee5606a53fc63c5fabdf9aff14268fc5 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Mon, 23 May 2016 17:43:45 +0300 Subject: [PATCH] 8155103: [TEST_BUG] @BeanProperty: unwanted "declaringClass" descriptor when annotating an enum Reviewed-by: ssadetsky, alexsch, avstepan --- .../java/beans/Introspector/BeanPropertyTest.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/jdk/test/java/beans/Introspector/BeanPropertyTest.java b/jdk/test/java/beans/Introspector/BeanPropertyTest.java index 5e84aaaed4e..d2c12df0ed0 100644 --- a/jdk/test/java/beans/Introspector/BeanPropertyTest.java +++ b/jdk/test/java/beans/Introspector/BeanPropertyTest.java @@ -38,8 +38,6 @@ import java.util.Arrays; * @author a.stepanov * @run main BeanPropertyTest */ - - public class BeanPropertyTest { private final static String DESCRIPTION = "TEST"; @@ -853,8 +851,7 @@ public class BeanPropertyTest { public void removePropertyChangeListener(PropertyChangeListener l) {} } - // JDK-8155103 - public static enum E { + public enum E { ONE, TWO { @@ -889,7 +886,7 @@ public class BeanPropertyTest { } - private static enum EB { + private enum EB { TRUE(true), FALSE(false); @@ -1064,9 +1061,7 @@ public class BeanPropertyTest { // enums Class enumCases[] = { - - // TODO: uncomment/update after 8155103 fix - //E.class, E.TWO.getClass(), EB.class + E.class, E.TWO.getClass(), EB.class }; int ne = 1; @@ -1076,7 +1071,7 @@ public class BeanPropertyTest { ne++; BeanInfo i; - try { i = Introspector.getBeanInfo(c, Object.class); } + try { i = Introspector.getBeanInfo(c, Enum.class); } catch (IntrospectionException e) { throw new RuntimeException(e); } boolean ok = checkInfo(i, !ignoreVals(c)); System.out.println(ok ? "OK" : "NOK");