This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]