ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32557] - DependTest.testClosure fails under JDK 1.5
Date Wed, 22 Dec 2004 14:11:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32557>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32557


conor@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7




------- Additional Comments From conor@apache.org  2004-12-22 15:11 -------
JDK 1.5 is much smarter when it comes to handling the code in one of the test
files. 
public class E {
    E() {
        System.out.println(A.class);
    }
}

In JDK 1.5, thie uses a class reference in the produced class file to A, rather
than a string reference as used in previous versions. The code for the above has
gone from:

{
static java.lang.Class class$A;
  Synthetic: true

E();
  Code:
   Stack=3, Locals=1, Args_size=1
   0:   aload_0
   1:   invokespecial   #6; //Method java/lang/Object."<init>":()V
   4:   getstatic       #7; //Field java/lang/System.out:Ljava/io/PrintStream;
   7:   getstatic       #8; //Field class$A:Ljava/lang/Class;
   10:  ifnonnull       25
   13:  ldc     #9; //String A
   15:  invokestatic    #10; //Method class$:(Ljava/lang/String;)Ljava/lang/Class;
   18:  dup
   19:  putstatic       #8; //Field class$A:Ljava/lang/Class;
   22:  goto    28
   25:  getstatic       #8; //Field class$A:Ljava/lang/Class;
   28:  invokevirtual   #11; //Method
java/io/PrintStream.println:(Ljava/lang/Object;)V
   31:  return

static java.lang.Class class$(java.lang.String);
  Code:
   Stack=3, Locals=2, Args_size=1
   0:   aload_0
   1:   invokestatic    #1; //Method
java/lang/Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
   4:   areturn
   5:   astore_1
   6:   new     #3; //class java/lang/NoClassDefFoundError
   9:   dup
   10:  aload_1
   11:  invokevirtual   #4; //Method
java/lang/ClassNotFoundException.getMessage:()Ljava/lang/String;
   14:  invokespecial   #5; //Method
java/lang/NoClassDefFoundError."<init>":(Ljava/lang/String;)V
   17:  athrow
  Exception table:
   from   to  target type
     0     4     5   Class java/lang/ClassNotFoundException

  Synthetic: true

}


to


E();
  Code:
   Stack=2, Locals=1, Args_size=1
   0:   aload_0
   1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
   4:   getstatic       #2; //Field java/lang/System.out:Ljava/io/PrintStream;
   7:   ldc_w   #3; //class A
   10:  invokevirtual   #4; //Method
java/io/PrintStream.println:(Ljava/lang/Object;)V
   13:  return

}

Quite an improvment.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message