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

Unnecessary checkcast in generated code

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      $ 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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: