changeset 14786:e608ac5f93e5

8155103: [TEST_BUG] @BeanProperty: unwanted "declaringClass" descriptor when annotating an enum Reviewed-by: ssadetsky, alexsch, avstepan
author serb
date Mon, 23 May 2016 17:43:45 +0300
parents 174b223645b7
children fa716186bb0e
files test/java/beans/Introspector/BeanPropertyTest.java
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/beans/Introspector/BeanPropertyTest.java	Sun May 22 12:31:56 2016 +0400
+++ b/test/java/beans/Introspector/BeanPropertyTest.java	Mon May 23 17:43:45 2016 +0300
@@ -38,8 +38,6 @@
  * @author a.stepanov
  * @run main BeanPropertyTest
  */
-
-
 public class BeanPropertyTest {
 
     private final static String  DESCRIPTION = "TEST";
@@ -853,8 +851,7 @@
         public void removePropertyChangeListener(PropertyChangeListener l) {}
     }
 
-    // JDK-8155103
-    public static enum E {
+    public enum E {
 
         ONE,
         TWO {
@@ -889,7 +886,7 @@
 
     }
 
-    private static enum EB {
+    private enum EB {
 
         TRUE(true), FALSE(false);
 
@@ -1064,9 +1061,7 @@
         // 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 @@
             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");