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

javac doesn't set ACC_STRICT for classes with package access

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • tools
    • b78
    • Verified

      Given a declaration like:

      strictfp class A {
          static {}
          A(){}
          void aa(){}
      }

      if you execute:

      javac A.java

      and later the following command:

      javap -v A | less

      We have:

      ...
      A();
          flags:
          Code:
            stack=1, locals=1, args_size=1
               0: aload_0
               1: invokespecial #1 // Method java/lang/Object."<init>":()V
               4: return
            LineNumberTable:
              line 3: 0

        void aa();
          flags:
          Code:
            stack=0, locals=1, args_size=1
               0: return
            LineNumberTable:
              line 4: 0

        static {};
          flags: ACC_STATIC
          Code:
            stack=0, locals=0, args_size=0
               0: return

      So the strictfp modifier is totally ignored for this class.

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: