src/share/classes/java/lang/reflect/Parameter.java

Print this page

        

@@ -102,11 +102,11 @@
      *
      * @return true if and only if the parameter has a name according
      * to the class file.
      */
     public boolean isNamePresent() {
-        return executable.hasRealParameterData();
+        return executable.hasRealParameterData() && name != null;
     }
 
     /**
      * Returns a string describing this parameter.  The format is the
      * modifiers for the parameter, if any, in canonical order as