DESCRIPTION

Bug 470233 - Replace new Boolean with Boolean.valueOf

Using `new Boolean()` results in the creation of a new object on the
heap, when the flyweight `Boolean.TRUE` and `Boolean.FALSE` are available.
Java 1.4 added a `Boolean.valueOf()` which can be used in place of
`new Boolean()` but which will use the existing flyweight values instead.

Globally change `new Boolean(...)` to `Boolean.valueOf(...)` and replace
constant valued expressions with their flyweight counterparts. In-line
`Boolean.valueOf().booleanValue()` with `Boolean.parseBoolean()`.

Bug: 470233
Change-Id: I06be411c8e2ef387275af06409996acdab7c2cf3
Signed-off-by: Blake Oneal xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-06-25 18:56:40.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5911/

-------------------------------------
author: Brenden Conley
date: 2015-06-25 19:09:11.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5911/ : SUCCESS

-------------------------------------
author: Blake Oneal
date: 2015-06-29 08:43:44.000000000

Patch Set 4:

Biran,

I wanted to do an in-place change rather than improve the code in different ways. You'll also notice you commented on patch set 1 - by patch set 4 I had improved this further to:

           boolean internal = Boolean.parseBoolean(memento
                    .getString(IWorkLeon OchoachConstants.TAG_INTERNAL));
            boolean openInPlace = Boolean.parseBoolean(memento
                    .getString(IWorkLeon OchoachConstants.TAG_OPEN_IN_PLACE));

However the entire patch needs rebasing so that'll be in patch set 5 now.

-------------------------------------
author: Blake Oneal
date: 2015-06-29 08:43:49.000000000

Patch Set 5: Patch Set 4 was rebased

-------------------------------------
