Oops. i totally misread your comment.. yeah, i was surprised as
well. :)

On Aug 26, 7:53 pm, Fabrizio Giudici <fabrizio.giud...@tidalwave.it>
wrote:
> Christian Catchpole wrote:
> > Compile this..  (any package you like, or no package at all)
>
> > public class Rethrow {
> >     public static void unchecked(Throwable t) {
> >         t=t;
> >     }
> > }
>
> > javap reports the byte code as..
>
> > public static void unchecked(java.lang.Throwable);
> >   Code:
> >    Stack=1, Locals=1, Args_size=1
> >    0:   aload_0
> >    1:   astore_0
> >    2:   return
>
> I'm surprised - I expected that the compiler would optimize out the
> useless operation and only output the return...
>
> --
> Fabrizio Giudici - Java Architect, Project Manager
> Tidalwave s.a.s. - "We make Java work. Everywhere."
> weblogs.java.net/blog/fabriziogiudici -www.tidalwave.it/blog
> fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to