[Patch][gui] Improving usage of java.lang.Boolean

Tom Tromey tromey@redhat.com
Mon Oct 25 19:20:00 GMT 2004


>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:

Michael> I just commited the attached patch to improved some places where an
Michael> instance of java.lang.Boolean is needed. It better to use
Michael> Boolean.valueOf() instead of creating a new instance each time.

Nice catch.

Michael> -  public static final Boolean RUN_DIRECTION_LTR = new Boolean (true);

In situations like this it is even better to use Boolean.TRUE or
Boolean.FALSE.

Tom



More information about the Java-patches mailing list