< prev index next >

src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java

Print this page

        

@@ -131,10 +131,12 @@
 
                 Object defaultValue = method.getDefaultValue();
                 if (defaultValue != null) {
                     memberDefaults.put(name, defaultValue);
                 }
+            } else {
+                throw new IllegalArgumentException(method + " has invalid modifier");                
             }
         }
 
         // Initialize retention, & inherited fields.  Special treatment
         // of the corresponding annotation types breaks infinite recursion.
< prev index next >