Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6362451

the string returned by toString() shows the bridge methods as having the volatile modificator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0u6
    • Fix Version/s: 5.0
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Build:
      b06
    • Introduced In Version:
      5.0
    • CPU:
      generic
    • OS:
      generic

      Description

      The string returned by toString() shows the bridge methods as having the volatile modificator.

      Run the following code:

      import java.lang.reflect.Method;

      public class BridgeMethodTest {

          public static void main(String[] args) throws ClassNotFoundException {
              Class cl = Class.forName("java.lang.String");
              for(Method m : cl.getDeclaredMethods()) {
                  if (m.isBridge())
                      System.out.println(m);
              }
          }
      }

      The result is:
      public volatile int java.lang.String.compareTo(java.lang.Object)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                rmakarch Roman Makarchuk (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: