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

Unnecessary checkcast in generated code

XMLWordPrintable

    • generic, x86
    • generic, windows_xp

      $ cat A.java
      class A {
          void A(Object o) {
              int[] x = (int[]) o;
          }
      }
      $ javap -c A
      Compiled from "A.java"
      class A extends java.lang.Object{
      A();
        Code:
         0: aload_0
         1: invokespecial #1; //Method java/lang/Object."<init>":()V
         4: return
       
      void A(java.lang.Object);
        Code:
         0: aload_1
         1: checkcast #2; //class "[I"
         4: checkcast #2; //class "[I"
         7: astore_2
         8: return
       
      }

      ###@###.### 2005-03-28 20:06:46 GMT

            vromero Vicente Arturo Romero Zaldivar
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: