diff options
author | Alex Blewitt | 2015-07-31 22:08:17 +0000 |
---|---|---|
committer | Alex Blewitt | 2015-09-03 10:21:11 +0000 |
commit | 9d920dc184c0ea2271a9f088d1af6f52df1b4eed (patch) | |
tree | 6022f848e592ea43b840222a49ea0304f00c722e /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model | |
parent | 678c63a96bd3bce570a62beb5546ca0b29d608a0 (diff) | |
download | eclipse.platform.debug-9d920dc184c0ea2271a9f088d1af6f52df1b4eed.tar.gz eclipse.platform.debug-9d920dc184c0ea2271a9f088d1af6f52df1b4eed.tar.xz eclipse.platform.debug-9d920dc184c0ea2271a9f088d1af6f52df1b4eed.zip |
Bug 474074 - Replace new Boolean with Boolean.valueOfI20150908-0800
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
`new Boolean(...).booleanValue()` to `Boolean.parseBoolean(...)`.
Change-Id: I95bed6f2af0293c20d1ac7076ca151b85d1f962d
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java index cbd39c940..223d7ffcb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 IBM Corporation and others. + * Copyright (c) 2006, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1833,7 +1833,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree if (!accepted) { item.setChecked(!checked); } else { - item.setData(PREV_CHECKED_KEY, new Boolean(checked)); + item.setData(PREV_CHECKED_KEY, Boolean.valueOf(checked)); } } else { ((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.SELECT|IModelDelta.REVEAL); |