This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch][gui] Improving usage of java.lang.Boolean
- From: Tom Tromey <tromey at redhat dot com>
- To: "Michael Koch" <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: 25 Oct 2004 13:19:57 -0600
- Subject: Re: [Patch][gui] Improving usage of java.lang.Boolean
- References: <20041025103956.GA23127@asterix.konqueror.de>
- Reply-to: tromey at redhat dot com
>>>>> "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