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

java.lang.Class.getModifiers() works incorrectly on Solaris

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • core-libs



      Name: ksC84122 Date: 06/08/99


      JDK 1.3 java.lang.Class.getModifiers() returns wrong integer on NT platform.
      This method called on an instance of interface returns a modifier which
      indicates that interface is not abstract.

      A test example which demonstrates this problem.
      ===== test.java ========
      import java.lang.reflect.*;

      class test {
          public static void main(String argv[]){
              int mod = Cloneable.class.getModifiers();
              System.out.println("mod = " + mod);
              if ( Modifier.isAbstract(mod) ) {
                  System.out.println( "OKAY" );
                  return;
              }
              System.out.println("Failed");
              return;
          }
      }

      ========= Sample run (JDK1.3 NT) ==========
      d:\home\sko>g:\jdk1.3\windows\bin\java test
      mod = 513
      Failed

      ========= Sample run (JDK1.2.2 NT) ==========
      d:\home\sko>g:\jdk1.2.2\windows\bin\java test
      mod = 1537
      OKAY

      ========= Sample run (JDK1.3 Solaris) ==========
      java test
      mod = 1537
      OKAY

      ======================================================================

            dbowensunw David Bowen (Inactive)
            skosunw Sko Sko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: