JDK-6316717 : (reflect) Method.toGenericString prints out inappropriate modifiers
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-08-26
  • Updated: 2012-09-28
  • Resolved: 2005-09-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b53Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The modifier bit position for the bridge flag on a method is the same as the bit position for the volatile property of a field.  Currently if Method.toGenericString is called on a bridge method the "volatile" property will inappropriately appear.

Comments
SUGGESTED FIX src/share/classes/java/lang/reflect>0 Constructor.java < ------- Constructor.java ------- 56a57,60 > // Modifiers that can be applied to a constructor in source code > private static final int LANGUAGE_MODIFIERS = > Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; > 388c392 < int mod = getModifiers(); --- > int mod = getModifiers() & LANGUAGE_MODIFIERS; src/share/classes/java/lang/reflect>sccs sccsdiff -r1.50 -r1.51 Method.java ------- Method.java ------- 46,47d45 < < 74c72,76 < // Generics infrastructure --- > // Modifiers that can be applied to a method in source code > private static final int LANGUAGE_MODIFIERS = > Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | > Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | > Modifier.SYNCHRONIZED | Modifier.NATIVE; 75a78,79 > // Generics infrastructure > 457c461 < int mod = getModifiers(); --- > int mod = getModifiers() & LANGUAGE_MODIFIERS; *** (#1 of 1): [ UNSAVED ] ###@###.###
31-08-2005

EVALUATION Should be fixed.
26-08-2005