diff options
author | Alex Blewitt | 2015-06-18 18:55:01 +0000 |
---|---|---|
committer | Alex Blewitt | 2015-07-06 07:46:20 +0000 |
commit | 9ee96387c3c9b80f76fa76476f4d0fa5764f4919 (patch) | |
tree | 20a3db893b2db4503ac53222599a72ca3ef7d210 /bundles/org.eclipse.equinox.security | |
parent | bde007b013512c536e1e8c5b616961a6a0140347 (diff) | |
download | rt.equinox.bundles-9ee96387c3c9b80f76fa76476f4d0fa5764f4919.tar.gz rt.equinox.bundles-9ee96387c3c9b80f76fa76476f4d0fa5764f4919.tar.xz rt.equinox.bundles-9ee96387c3c9b80f76fa76476f4d0fa5764f4919.zip |
Bug 470518 - 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.
Bug: 470518
Change-Id: I25742c65162e57fd553dd1284ec057cd4b333dbb
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.security')
-rw-r--r-- | bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java index 35f47453c..8f8d8cad2 100644 --- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java +++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java @@ -246,7 +246,7 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage // if this is (a headless run or JUnit) and prompt hint is not set up, set it to "false" boolean supressPrompts = !CallbacksProvider.getDefault().runningUI() || InternalExchangeUtils.isJUnitApp(); if (supressPrompts && container != null && !container.hasOption(IProviderHints.PROMPT_USER)) { - ((SecurePreferencesContainer) container).setOption(IProviderHints.PROMPT_USER, new Boolean(false)); + ((SecurePreferencesContainer) container).setOption(IProviderHints.PROMPT_USER, Boolean.FALSE); addedNoPrompt = true; } |