Call to defender method with missing return keyword hangs the JVM

Per Rovegård per at rovegard.se
Thu Dec 15 23:47:29 PST 2011


On Thu, Dec 15, 2011 at 8:12 PM, Robert Field <robert.field at oracle.com> wrote:
> Maurizio has fixed this bug in the most recent push.  It now gives:
>
> % ~/work/lambda/build/solaris-i586/j2sdk-image/bin/javac TestDefender.java
> TestDefender.java:7: error: missing return statement
>                 String sayHi() default { sayHi(this); }
>                                                       ^
> 1 error

Yup, just tested it and I get that error too. Things move quickly here! :-)

> % j2sdk-image/bin/javac TestDefender.java
> % j2sdk-image/bin/java -cp
> defender-prototype/distrib/jsr335-agent.jar:defender-prototype/lib/asm-4.0.jar
> jsr335.agent.Main -d td --jdk j2sdk-image TestDefender*.class
> % cd td
> % j2sdk-image/bin/java TestDefender
> Hello from TestDefender$AImpl at 1d9c3e7

I don't have to use defender-prototype at this point. I can simply use "java":

$ ../lambda/build/linux-amd64/j2sdk-image/bin/java TestDefender
Hello from TestDefender$AImpl at 2bb0bf9a

I assumed that you "hard-wire" defender-prototype into the tool chain
during the JDK build process in some way. Isn't it so?

--Per


More information about the lambda-dev mailing list