Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2015-09-06 12:13:21 -0400
committerAlex Blewitt2015-09-07 17:49:13 -0400
commite3e578c98878b6e5bc8b9140389ffe36c5651b56 (patch)
tree6c22e2cf834d3c6a267611f2d59b9d1c45511c90
parent4c1b71edc5f460ce4dc183f592449b24dbe53c97 (diff)
downloadrt.equinox.p2-I20150913-2000.tar.gz
rt.equinox.p2-I20150913-2000.tar.xz
rt.equinox.p2-I20150913-2000.zip
The new Boolean constructor creates a new instance of a Boolean object, but it can easily be replaced with Boolean.valueOf which returns the reference to the global Boolean.TRUE or Boolean.FALSE. Replace calls to new Boolean() with Boolean.valueOf() for identical semantics except without object collection. Additionally Boolean.valueOf().booleanValue() is identical to Boolean.parseBoolean() and will result in no garbage. In addition, methods will be (slightly) smaller and parseBoolean will often be in-lined by the JIT, which can often prove that the value is non-null for faster checking. Replace Boolean.valueOf().booleanValue() chains with Boolean.parseBoolean(). Some other tests can use Wrapper.valueOf() to take advantage of the built-in caches that these objects maintain (for values in the range -128..127). Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com> Change-Id: I5da4216a26ffbb6b8fd3365515ee800dd82b36ae
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/RepositoryListenerTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPatchPersistenceTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/expression/FilterTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java6
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java2
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java6
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java4
61 files changed, 177 insertions, 184 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index e17405051..b8ccbe5af 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -628,7 +628,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
if (repoProperties != null) {
String value = repoProperties.get(PROP_ATOMIC_LOADING);
if (value != null) {
- failOnChildFailure = Boolean.valueOf(value).booleanValue();
+ failOnChildFailure = Boolean.parseBoolean(value);
}
}
return failOnChildFailure;
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index fd012d359..f9c74b9e3 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -334,7 +334,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
boolean lockAcquired = false;
try {
- canLock = new Boolean(canLock());
+ canLock = Boolean.valueOf(canLock());
if (canLock.booleanValue()) {
lockAcquired = lockAndLoad(true, new NullProgressMonitor());
if (!lockAcquired)
@@ -1019,7 +1019,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
if (updateTimestamp)
updateTimestamp();
if (canLock == null)
- canLock = new Boolean(canLock());
+ canLock = Boolean.valueOf(canLock());
}
private String getBlobStoreName(String defaultValue) {
@@ -1045,9 +1045,9 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
if (internalDescriptor != null) {
String useArtifactFolder = internalDescriptor.getRepositoryProperty(ARTIFACT_FOLDER);
if (useArtifactFolder != null)
- return Boolean.valueOf(useArtifactFolder).booleanValue();
+ return Boolean.parseBoolean(useArtifactFolder);
}
- return Boolean.valueOf(descriptor.getProperty(ARTIFACT_FOLDER)).booleanValue();
+ return Boolean.parseBoolean(descriptor.getProperty(ARTIFACT_FOLDER));
}
private boolean isForceThreading() {
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
index 64e3ab628..d0ddc77a5 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
@@ -267,7 +267,7 @@ public class ProvCommandProvider implements CommandProvider {
interpreter.println("Please enter a query");
return;
}
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
+ boolean useFull = Boolean.parseBoolean(processArgument(interpreter.nextArgument()));
URI repoURL = null;
if (urlString != null && !urlString.equals(WILDCARD_ANY))
repoURL = toURI(interpreter, urlString);
@@ -565,7 +565,7 @@ public class ProvCommandProvider implements CommandProvider {
return;
}
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
+ boolean useFull = Boolean.parseBoolean(processArgument(interpreter.nextArgument()));
IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index 891ff3ba0..1d077beaf 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -780,7 +780,7 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
Collection<IInstallableUnit> uninstalls = collectRoots(profile, rootsToUninstall, false);
// keep this result status in case there is a problem so we can report it to the user
- boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
+ boolean wasRoaming = Boolean.parseBoolean(profile.getProperty(IProfile.PROP_ROAMING));
try {
updateRoamingProperties(profile);
ProvisioningContext context = new ProvisioningContext(targetAgent);
@@ -793,7 +793,7 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
planAndExecute(profile, context, request);
} finally {
// if we were originally were set to be roaming and we changed it, change it back before we return
- if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
+ if (wasRoaming && !Boolean.parseBoolean(profile.getProperty(IProfile.PROP_ROAMING)))
setRoaming(profile);
}
}
@@ -1318,7 +1318,7 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
throw new ProvisionException(Messages.Missing_profileid);
// make sure that we are set to be roaming before we update the values
- if (!Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
+ if (!Boolean.parseBoolean(profile.getProperty(IProfile.PROP_ROAMING)))
return;
ProfileChangeRequest request = new ProfileChangeRequest(profile);
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
index a753b225f..d2c5aeadd 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -196,7 +196,7 @@ public class DirectorTask extends Task implements ILog {
public void setList(String value) {
if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- list = Boolean.valueOf(value).booleanValue();
+ list = Boolean.parseBoolean(value);
}
public void setMetadataRepository(String value) {
@@ -231,7 +231,7 @@ public class DirectorTask extends Task implements ILog {
public void setRoaming(String value) {
if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- roaming = Boolean.valueOf(value).booleanValue();
+ roaming = Boolean.parseBoolean(value);
}
public void setUninstallIU(String value) {
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 8f5780076..34566b09f 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -279,7 +279,7 @@ public class SimplePlanner implements IPlanner {
}
private static boolean hasHigherFidelity(IInstallableUnit iu, IInstallableUnit currentIU) {
- if (Boolean.valueOf(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue() && !Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue())
+ if (Boolean.parseBoolean(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)) && !Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)))
return true;
return false;
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
index 39c95fc59..01a9a98cf 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -81,7 +81,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
File bundlePoolFile = new File(bundlePool);
if (bundlePoolFile.exists())
artifactRepos.add(bundlePoolFile.toURI());
- else if (Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) {
+ else if (Boolean.parseBoolean(profile.getProperty(IProfile.PROP_ROAMING))) {
// the profile has not been used yet but is a roaming profile
// best effort to add "just" the default bundle pool
bundlePoolFile = findDefaultBundlePool(p2Directory);
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
index c1e5b1437..2efe605c4 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
@@ -144,7 +144,7 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
DebugHelper.debug(PROFILE_REGISTRY, "SimpleProfileRegistry.updateSelfProfile"); //$NON-NLS-1$
boolean changed = false;
//only update if self is a roaming profile
- if (Boolean.valueOf(selfProfile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
+ if (Boolean.parseBoolean(selfProfile.getProperty(IProfile.PROP_ROAMING)))
changed = updateRoamingProfile(selfProfile);
if (changed)
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
index ac2529664..3d7e313fa 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
@@ -99,7 +99,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
Location installLocation = ServiceHelper.getService(EngineActivator.getContext(), Location.class, Location.INSTALL_FILTER);
File installFolder = new File(installLocation.getURL().getPath());
- if (Boolean.valueOf(sharedProfile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) {
+ if (Boolean.parseBoolean(sharedProfile.getProperty(IProfile.PROP_ROAMING))) {
userProfile.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.getAbsolutePath());
userProfile.setProperty(IProfile.PROP_SHARED_CACHE, installFolder.getAbsolutePath());
userProfile.setProperty(IProfile.PROP_ROAMING, Boolean.FALSE.toString());
@@ -270,7 +270,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
* @see org.eclipse.equinox.internal.p2.engine.ISurrogateProfileHandler#isSurrogate(org.eclipse.equinox.internal.provisional.p2.engine.IProfile)
*/
public boolean isSurrogate(IProfile profile) {
- return Boolean.valueOf(profile.getProperty(PROP_SURROGATE)).booleanValue();
+ return Boolean.parseBoolean(profile.getProperty(PROP_SURROGATE));
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
index 834f80d41..aec765487 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -20,7 +20,7 @@ import org.eclipse.equinox.internal.p2.engine.phases.*;
*/
public class PhaseSetFactory {
- private static final boolean forcedUninstall = Boolean.valueOf(EngineActivator.getContext().getProperty("org.eclipse.equinox.p2.engine.forcedUninstall")).booleanValue(); //$NON-NLS-1$
+ private static final boolean forcedUninstall = Boolean.parseBoolean(EngineActivator.getContext().getProperty("org.eclipse.equinox.p2.engine.forcedUninstall")); //$NON-NLS-1$
/**
* A phase id (value "checkTrust") describing the certificate trust check phase.
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
index 55dad13bb..289ac34b8 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -248,11 +248,11 @@ public class ProvisioningContext {
}
private boolean shouldFollowReferences() {
- return Boolean.valueOf(getProperty(FOLLOW_REPOSITORY_REFERENCES)).booleanValue();
+ return Boolean.parseBoolean(getProperty(FOLLOW_REPOSITORY_REFERENCES));
}
private boolean shouldFollowArtifactReferences() {
- return Boolean.valueOf(getProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES)).booleanValue();
+ return Boolean.parseBoolean(getProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES));
}
/**
@@ -328,7 +328,6 @@ public class ProvisioningContext {
* and artifact repositories to be used are determined when the client
* retrieves the metadata queryable. Clients should not reset the list of
* metadata repository locations once the metadata queryable has been retrieved.
-
* @param metadataRepositories the metadata repository locations
*/
public void setMetadataRepositories(URI[] metadataRepositories) {
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
index 0236a16ae..6064d49c1 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -35,6 +35,6 @@ public class UserVisibleRootQuery extends IUProfilePropertyQuery {
*/
public static boolean isUserVisible(IInstallableUnit iu, IProfile profile) {
String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
- return Boolean.valueOf(value).booleanValue();
+ return Boolean.parseBoolean(value);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
index 886c4ab30..646ff050b 100644
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -124,7 +124,7 @@ public class GarbageCollector implements SynchronousProvisioningListener, IAgent
// todo we should look in the instance scope as well but have to be careful that the instance location has been set
nodes.add(ConfigurationScope.INSTANCE.getNode(GCActivator.ID));
nodes.add(DefaultScope.INSTANCE.getNode(GCActivator.ID));
- return Boolean.valueOf(prefService.get(key, Boolean.toString(defaultValue), nodes.toArray(new Preferences[nodes.size()]))).booleanValue();
+ return Boolean.parseBoolean(prefService.get(key, Boolean.toString(defaultValue), nodes.toArray(new Preferences[nodes.size()])));
}
private void invokeCoreGC() {
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
index bd202adce..f0eabd95c 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 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
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.jarprocessor;
-import java.util.Properties;
-
import java.io.File;
import java.io.IOException;
import java.util.*;
@@ -98,7 +96,7 @@ public class PackStep extends CommandStep {
for (Iterator<Properties> iterator = containers.iterator(); iterator.hasNext();) {
Properties container = iterator.next();
if (container.containsKey(Utils.MARK_EXCLUDE_CHILDREN_PACK)) {
- if (Boolean.valueOf(container.getProperty(Utils.MARK_EXCLUDE_CHILDREN_PACK)).booleanValue()) {
+ if (Boolean.parseBoolean(container.getProperty(Utils.MARK_EXCLUDE_CHILDREN_PACK))) {
if (verbose)
System.out.println(input.getName() + " is excluded from pack200 by its containers."); //$NON-NLS-1$
return false;
@@ -108,7 +106,7 @@ public class PackStep extends CommandStep {
}
//2: excluded by self
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_PACK)).booleanValue()) {
+ if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.parseBoolean(inf.getProperty(Utils.MARK_EXCLUDE_PACK))) {
if (verbose)
System.out.println("Excluding " + input.getName() + " from " + getStepName()); //$NON-NLS-1$ //$NON-NLS-2$
return false;
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
index c6c0f6d7d..3b1792ac4 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 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
@@ -73,7 +73,7 @@ public class SignCommandStep extends CommandStep {
for (Iterator<Properties> iterator = containers.iterator(); iterator.hasNext();) {
inf = iterator.next();
if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN_SIGN)) {
- if (Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN_SIGN)).booleanValue()) {
+ if (Boolean.parseBoolean(inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN_SIGN))) {
if (verbose)
System.out.println(input.getName() + "is excluded from signing by its containers."); //$NON-NLS-1$
return false;
@@ -84,7 +84,7 @@ public class SignCommandStep extends CommandStep {
//2: Is this jar itself marked as exclude?
inf = Utils.getEclipseInf(input, verbose);
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_SIGN) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_SIGN)).booleanValue()) {
+ if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_SIGN) && Boolean.parseBoolean(inf.getProperty(Utils.MARK_EXCLUDE_SIGN))) {
if (verbose)
System.out.println("Excluding " + input.getName() + " from signing."); //$NON-NLS-1$ //$NON-NLS-2$
return false;
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
index feeddc667..f8eca6fb0 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 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
@@ -285,7 +285,7 @@ public class Utils {
String exclude = inf.getProperty(MARK_EXCLUDE);
//was marked as exclude, we should skip
- if (exclude != null && Boolean.valueOf(exclude).booleanValue())
+ if (exclude != null && Boolean.parseBoolean(exclude))
return true;
//process all was set, don't skip
@@ -294,7 +294,7 @@ public class Utils {
//otherwise, we skip if not marked marked
String marked = inf.getProperty(MARK_PROPERTY);
- return !Boolean.valueOf(marked).booleanValue();
+ return !Boolean.parseBoolean(marked);
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
index f4a1dfd44..05d9253e9 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 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
@@ -174,7 +174,7 @@ public class JarProcessor {
//skip if excluding children
if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN)) {
String excludeChildren = inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN);
- if (Boolean.valueOf(excludeChildren).booleanValue())
+ if (Boolean.parseBoolean(excludeChildren))
if (verbose) {
for (int i = 0; i <= depth; i++)
System.out.print(" "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
index ff4d5f28b..1f436063f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -410,7 +410,7 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
if (repoProperties != null) {
String value = repoProperties.get(PROP_ATOMIC_LOADING);
if (value != null) {
- failOnChildFailure = Boolean.valueOf(value).booleanValue();
+ failOnChildFailure = Boolean.parseBoolean(value);
}
}
return failOnChildFailure;
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
index 5beff866f..00f4c193c 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -69,6 +69,6 @@ public class RemoveChildTask extends AbstractMDRTask {
* Set whether or not we should remove all the children.
*/
public void setAllChildren(String value) {
- allChildren = Boolean.valueOf(value).booleanValue();
+ allChildren = Boolean.parseBoolean(value);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
index 3c68c1635..4a66a26b1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Cloudsmith Inc. and others.
+ * Copyright (c) 2010, 2015 Cloudsmith Inc. 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
@@ -14,8 +14,9 @@ package org.eclipse.equinox.p2.query;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.ContextExpression;
import org.eclipse.equinox.internal.p2.metadata.expression.Expression.VariableFinder;
+import org.eclipse.equinox.internal.p2.metadata.expression.ExpressionFactory;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.expression.*;
@@ -235,7 +236,7 @@ public class QueryUtil {
return QueryUtil.createMatchQuery(matchIU_propNull, propertyName);
if (ANY.equals(propertyValue))
return QueryUtil.createMatchQuery(matchIU_propAny, propertyName);
- if (Boolean.valueOf(propertyValue).booleanValue())
+ if (Boolean.parseBoolean(propertyValue))
return QueryUtil.createMatchQuery(matchIU_propTrue, propertyName);
return QueryUtil.createMatchQuery(matchIU_propValue, propertyName, propertyValue);
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
index 38d11afdc..955bf2ff1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -23,7 +23,8 @@ import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.publisher.eclipse.Feature;
import org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.publishing.*;
+import org.eclipse.pde.internal.publishing.Activator;
+import org.eclipse.pde.internal.publishing.Constants;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
@@ -162,8 +163,8 @@ public class FeatureManifestParser extends DefaultHandler {
result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
result.setBrandingPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
- result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
- result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
+ result.setExclusive(Boolean.parseBoolean(attributes.getValue("exclusive"))); //$NON-NLS-1$
+ result.setPrimary(Boolean.parseBoolean(attributes.getValue("primary"))); //$NON-NLS-1$
result.setColocationAffinity(attributes.getValue("colocation-affinity")); //$NON-NLS-1$
result.setProviderName(localize(attributes.getValue("provider-name"))); //$NON-NLS-1$
@@ -204,10 +205,10 @@ public class FeatureManifestParser extends DefaultHandler {
FeatureEntry entry = new FeatureEntry(attributes.getValue("id"), attributes.getValue("version"), false); //$NON-NLS-1$ //$NON-NLS-2$
String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
if (unpack != null)
- entry.setUnpack(Boolean.valueOf(unpack).booleanValue());
+ entry.setUnpack(Boolean.parseBoolean(unpack));
String optional = attributes.getValue("optional"); //$NON-NLS-1$
if (optional != null)
- entry.setOptional(Boolean.valueOf(optional).booleanValue());
+ entry.setOptional(Boolean.parseBoolean(optional));
setEnvironment(attributes, entry);
String filter = attributes.getValue("filter"); //$NON-NLS-1$
if (filter != null)
@@ -237,10 +238,10 @@ public class FeatureManifestParser extends DefaultHandler {
setEnvironment(attributes, plugin);
String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
if (unpack != null)
- plugin.setUnpack(Boolean.valueOf(unpack).booleanValue());
+ plugin.setUnpack(Boolean.parseBoolean(unpack));
String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
if (fragment != null)
- plugin.setFragment(Boolean.valueOf(fragment).booleanValue());
+ plugin.setFragment(Boolean.parseBoolean(fragment));
String filter = attributes.getValue("filter"); //$NON-NLS-1$
if (filter != null)
plugin.setFilter(filter);
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index 9b0358cd0..a1d37c742 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -937,7 +937,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
}
value = attributes.getValue(ATTRIBUTE_AUTO_START);
if (value != null)
- info.setMarkedAsStarted(Boolean.valueOf(value).booleanValue());
+ info.setMarkedAsStarted(Boolean.parseBoolean(value));
if (bundleInfos == null)
bundleInfos = new ArrayList<BundleInfo>();
bundleInfos.add(info);
@@ -1111,9 +1111,9 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
String pluginVersion = attributes.getValue(ATTRIBUTE_VERSION);
FeatureEntry entry = new FeatureEntry(pluginId, pluginVersion != null ? pluginVersion : GENERIC_VERSION_NUMBER, true);
- entry.setFragment(Boolean.valueOf(fragment).booleanValue());
+ entry.setFragment(Boolean.parseBoolean(fragment));
- if (fragment != null && new Boolean(fragment).booleanValue()) {
+ if (fragment != null && Boolean.parseBoolean(fragment)) {
fragments.add(entry);
} else {
plugins.add(entry);
@@ -1148,7 +1148,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
if (productContentType == null) { // useFeatures attribute is taken into account only if the contentType attribute is missing
String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
// for backward compatibility with the old behavior
- if (use != null && Boolean.valueOf(use).booleanValue())
+ if (use != null && Boolean.parseBoolean(use))
productContentType = ProductContentType.FEATURES;
else
productContentType = ProductContentType.BUNDLES;
@@ -1219,7 +1219,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
}
private void processWin(Attributes attributes) {
- // useIco = Boolean.valueOf(attributes.getValue(P_USE_ICO)).booleanValue();
+ // useIco = Boolean.parseBoolean(attributes.getValue(P_USE_ICO));
}
private void processIco(Attributes attributes) {
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
index d82b422fc..4881ad503 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -65,7 +65,7 @@ public class GatherBundleAction extends BundlesAction {
String shape = manifest.get(BUNDLE_SHAPE);
if (shape == null) {
if (unpack != null) {
- shape = Boolean.valueOf(unpack).booleanValue() ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
+ shape = Boolean.parseBoolean(unpack) ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
} else {
shape = Utils.guessUnpack(bundle, Utils.getBundleClasspath(manifest)) ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
index fcba0f1eb..42a1f53dc 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
@@ -57,7 +57,7 @@ public abstract class AbstractPublishTask extends Task {
}
/**
- * If not set, default is true if we aren't set as an metadata repo
+ * If not set, default is true if we aren't set as a metadata repo
*/
public boolean isArtifactRepository() {
if (artifact != null)
@@ -160,19 +160,19 @@ public abstract class AbstractPublishTask extends Task {
}
public void setCompress(String value) {
- compress = Boolean.valueOf(value).booleanValue();
+ compress = Boolean.parseBoolean(value);
}
public void setReusePackedFiles(String value) {
- reusePackedFiles = Boolean.valueOf(value).booleanValue();
+ reusePackedFiles = Boolean.parseBoolean(value);
}
public void setAppend(String value) {
- append = Boolean.valueOf(value).booleanValue();
+ append = Boolean.parseBoolean(value);
}
public void setPublishArtifacts(String value) {
- publish = Boolean.valueOf(value).booleanValue();
+ publish = Boolean.parseBoolean(value);
}
public void setArtifactRepository(String location) {
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
index b19757761..ad445e9e6 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2009, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -262,11 +262,11 @@ public class AdviceFileParser {
while (current != null && current.startsWith(prefix)) {
String token = current.substring(prefix.length());
if (token.equals(GREEDY)) {
- greedy = Boolean.valueOf(currentValue()).booleanValue();
+ greedy = Boolean.parseBoolean(currentValue());
} else if (token.equals(OPTIONAL)) {
- optional = Boolean.valueOf(currentValue()).booleanValue();
+ optional = Boolean.parseBoolean(currentValue());
} else if (token.equals(MULTIPLE)) {
- multiple = Boolean.valueOf(currentValue()).booleanValue();
+ multiple = Boolean.parseBoolean(currentValue());
} else if (token.equals(FILTER)) {
filter = currentValue();
} else if (token.equals(NAME)) {
@@ -395,7 +395,7 @@ public class AdviceFileParser {
unitVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
next();
} else if (token.equals(SINGLETON)) {
- unitSingleton = Boolean.valueOf(currentValue()).booleanValue();
+ unitSingleton = Boolean.parseBoolean(currentValue());
next();
} else if (token.equals(FILTER)) {
unitFilter = currentValue();
@@ -648,4 +648,4 @@ public class AdviceFileParser {
return adviceMetaRequires.toArray(new IRequirement[adviceMetaRequires.size()]);
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
index 96a6f86dd..45aad29f1 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -167,7 +167,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
// If link is optional, then the link target may not exist.
// So IF link is marked as optional AND does not exist, simply ignore it.
String optional = links.getProperty(LINK_IS_OPTIONAL);
- result.setOptional(Boolean.valueOf(optional).booleanValue());
+ result.setOptional(Boolean.parseBoolean(optional));
return result;
} catch (IOException e) {
LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_resolving_link, linkedFile.getAbsolutePath(), file.getAbsolutePath()), e));
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
index 09e4111f0..802ee1bb9 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -96,7 +96,7 @@ public class PlatformXmlListener extends DirectoryChangeListener {
* @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#getSeenFile(java.io.File)
*/
public Long getSeenFile(File file) {
- return new Long(0);
+ return Long.valueOf(0);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index e620372ae..af0017437 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -106,7 +106,7 @@ public class ProfileSynchronizer {
return Status.OK_STATUS;
ProvisioningContext context = getContext();
- context.setProperty(EXPLANATION, new Boolean(Tracing.DEBUG_RECONCILER).toString());
+ context.setProperty(EXPLANATION, Boolean.valueOf(Tracing.DEBUG_RECONCILER).toString());
String updatedCacheExtensions = synchronizeCacheExtensions();
@@ -555,7 +555,7 @@ public class ProfileSynchronizer {
public ReconcilerProfileChangeRequest createProfileChangeRequest(ProvisioningContext context) {
ReconcilerProfileChangeRequest request = new ReconcilerProfileChangeRequest(profile);
- boolean resolve = Boolean.valueOf(profile.getProperty("org.eclipse.equinox.p2.resolve")).booleanValue(); //$NON-NLS-1$
+ boolean resolve = Boolean.parseBoolean(profile.getProperty("org.eclipse.equinox.p2.resolve")); //$NON-NLS-1$
if (resolve)
request.removeProfileProperty("org.eclipse.equinox.p2.resolve"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
index 7aea221d7..12191f9b2 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -83,7 +83,7 @@ public class RecreateRepositoryApplication extends AbstractApplication {
IArtifactRepositoryManager manager = getArtifactRepositoryManager();
manager.removeRepository(repository.getLocation());
- boolean compressed = Boolean.valueOf(repoProperties.get(IRepository.PROP_COMPRESSED)).booleanValue();
+ boolean compressed = Boolean.parseBoolean(repoProperties.get(IRepository.PROP_COMPRESSED));
URI realLocation = SimpleArtifactRepository.getActualLocation(repository.getLocation(), compressed);
File realFile = URIUtil.toFile(realLocation);
if (!realFile.exists() || !realFile.delete())
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java
index beeb8fd0f..a1379346e 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* Copyright (c) 2009, 2015 EclipseSource 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,9 +9,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
@@ -21,7 +20,7 @@ import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
public class CopyrightAnalyzer extends IUAnalyzer {
public void analyzeIU(IInstallableUnit iu) {
- if (Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP)).booleanValue()) {
+ if (Boolean.parseBoolean(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP))) {
if (iu.getCopyright() == null || iu.getCopyright().getBody().length() == 0) {
// If there is no copyright at all, this is an error
error(iu, "[ERROR] " + iu.getId() + " has no copyright");
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java
index 9acf6bfea..ab9ff512f 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
+* Copyright (c) 2009, 2015 EclipseSource 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,10 +9,9 @@
******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.tools.analyzer.IIUAnalyzer;
@@ -27,7 +26,7 @@ public class IUCounting implements IIUAnalyzer {
int totalCategories = 0;
private boolean hasProperty(IInstallableUnit iu, String property) {
- return Boolean.valueOf(iu.getProperty(property)).booleanValue();
+ return Boolean.parseBoolean(iu.getProperty(property));
}
public void analyzeIU(IInstallableUnit iu) {
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java
index 313f5b079..c87089f8d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
+ * Copyright (c) 2009, 2015 EclipseSource 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,12 +9,10 @@
******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.ILicense;
-
import java.util.Collection;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
@@ -24,7 +22,7 @@ import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
public class LicenseAnalyzer extends IUAnalyzer {
public void analyzeIU(IInstallableUnit iu) {
- if (Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP)).booleanValue()) {
+ if (Boolean.parseBoolean(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP))) {
Collection<ILicense> licenses = iu.getLicenses();
if (iu.getLicenses() == null || licenses.size() == 0) {
// If there is no license then this is an error
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
index 6b576a20e..83b4df5d0 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -127,6 +127,6 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
/* p2.composite.artifact.repository.remove */
public void setAllChildren(String value) {
if (value != null && !value.startsWith(ANT_PREFIX))
- ((CompositeRepositoryApplication) application).setRemoveAll(Boolean.valueOf(value).booleanValue());
+ ((CompositeRepositoryApplication) application).setRemoveAll(Boolean.parseBoolean(value));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
index 2cc28cb63..3e85194c9 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -49,7 +49,7 @@ public class ProcessRepoTask extends Task {
}
public void setUnsign(String unsign) {
- this.unsign = Boolean.valueOf(unsign).booleanValue();
+ this.unsign = Boolean.parseBoolean(unsign);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
index 548958307..20c0bfb98 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
@@ -128,7 +128,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
info.location = repository.getLocation();
String value = repository.getProperties().get(IRepository.PROP_SYSTEM);
if (value != null)
- info.isSystem = Boolean.valueOf(value).booleanValue();
+ info.isSystem = Boolean.parseBoolean(value);
info.suffix = suffix;
}
// save the given repository in the preferences.
@@ -597,7 +597,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
info.nickname = value;
else if (IRepository.PROP_SYSTEM.equals(key))
//only true if value.equals("true") which is OK because a repository is only system if it's explicitly set to system.
- info.isSystem = Boolean.valueOf(value).booleanValue();
+ info.isSystem = Boolean.parseBoolean(value);
remember(info, true);
}
}
@@ -683,7 +683,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
if (added)
removeRepository(location, false);
//eagerly cleanup missing system repositories
- if (Boolean.valueOf(getRepositoryProperty(location, IRepository.PROP_SYSTEM)).booleanValue())
+ if (Boolean.parseBoolean(getRepositoryProperty(location, IRepository.PROP_SYSTEM)))
removeRepository(location);
else if (failure == null || (failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_AUTHENTICATION && failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_READ))
rememberNotFound(location);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java
index 22b1262ce..ce0d424c3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -229,8 +229,8 @@ public class ReducedCUDFParser {
// String value = line.substring("installed: ".length());
// if (value.length() != 0) {
// if (DEBUG)
- // if (!Boolean.valueOf(value).booleanValue()) {
- // System.err.println("Unexcepted value for installed.");
+ // if (!Boolean.parseBoolean(value)) {
+ // System.err.println("Unexpected value for installed.");
// return;
// }
// currentIU.setInstalled(true);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/RepositoryListenerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/RepositoryListenerTest.java
index b9cde8f0b..ea8f781ae 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/RepositoryListenerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/RepositoryListenerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -138,7 +138,7 @@ public class RepositoryListenerTest extends AbstractDirectoryWatcherTest {
assertEquals("8.0", 1, descriptors.length);
SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) descriptors[0];
String isFolder = descriptor.getRepositoryProperty("artifact.folder");
- if (Boolean.valueOf(isFolder).booleanValue()) {
+ if (Boolean.parseBoolean(isFolder)) {
assertNull("9.0", directoryDescriptor);
directoryDescriptor = descriptors[0];
} else {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPatchPersistenceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPatchPersistenceTest.java
index dcd54c8fc..aafb748b3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPatchPersistenceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPatchPersistenceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -102,7 +102,7 @@ public class IUPatchPersistenceTest extends AbstractProvisioningTest {
IRequirement[] required = new IRequirement[requireTuples.length];
for (int i = 0; i < requireTuples.length; i++) {
String[] nextTuple = requireTuples[i];
- required[i] = MetadataFactory.createRequirement(nextTuple[0], nextTuple[1], new VersionRange(nextTuple[2]), null, Boolean.valueOf(nextTuple[3]).booleanValue(), false);
+ required[i] = MetadataFactory.createRequirement(nextTuple[0], nextTuple[1], new VersionRange(nextTuple[2]), null, Boolean.parseBoolean(nextTuple[3]), false);
}
return required;
}
@@ -283,7 +283,7 @@ public class IUPatchPersistenceTest extends AbstractProvisioningTest {
IRequirementChange change1 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
IRequirementChange change2 = MetadataFactory.createRequirementChange(null, MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
IRequirementChange change3 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), null);
- IRequirement[][] scope = new IRequirement[][] { {MetadataFactory.createRequirement("foo", "bar", null, null, true, true), MetadataFactory.createRequirement("foo", "bar", null, null, true, true)}, {MetadataFactory.createRequirement("zoo", "far", null, null, true, true)}};
+ IRequirement[][] scope = new IRequirement[][] {{MetadataFactory.createRequirement("foo", "bar", null, null, true, true), MetadataFactory.createRequirement("foo", "bar", null, null, true, true)}, {MetadataFactory.createRequirement("zoo", "far", null, null, true, true)}};
IRequirement lifeCycle = MetadataFactory.createRequirement("zoo", "x", null, null, false, false, false);
IInstallableUnitPatch iu = createIUPatch(id, version, filter, requirements, additionalProvides, propertyMap, TOUCHPOINT_OSGI, tpData, singleton, update, new IRequirementChange[] {change1, change2, change3}, scope, lifeCycle, metaRequirements);
return iu;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java
index 2dda8bdfe..3be906192 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -211,7 +211,7 @@ public class IUPersistenceTest extends AbstractProvisioningTest {
IRequirement[] required = new IRequirement[requireTuples.length];
for (int i = 0; i < requireTuples.length; i++) {
String[] nextTuple = requireTuples[i];
- required[i] = MetadataFactory.createRequirement(nextTuple[0], nextTuple[1], new VersionRange(nextTuple[2]), null, Boolean.valueOf(nextTuple[3]).booleanValue(), false);
+ required[i] = MetadataFactory.createRequirement(nextTuple[0], nextTuple[1], new VersionRange(nextTuple[2]), null, Boolean.parseBoolean(nextTuple[3]), false);
}
return required;
}
@@ -273,7 +273,7 @@ public class IUPersistenceTest extends AbstractProvisioningTest {
IRequirementChange change1 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
IRequirementChange change2 = MetadataFactory.createRequirementChange(null, MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
IRequirementChange change3 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), null);
- IRequirement[][] scope = new IRequirement[][] { {MetadataFactory.createRequirement("foo", "bar", null, null, true, true), MetadataFactory.createRequirement("foo", "bar", null, null, true, true)}, {MetadataFactory.createRequirement("zoo", "far", null, null, true, true)}};
+ IRequirement[][] scope = new IRequirement[][] {{MetadataFactory.createRequirement("foo", "bar", null, null, true, true), MetadataFactory.createRequirement("foo", "bar", null, null, true, true)}, {MetadataFactory.createRequirement("zoo", "far", null, null, true, true)}};
IInstallableUnitPatch iu = createIUPatch(id, version, filter, requirements, additionalProvides, propertyMap, TOUCHPOINT_OSGI, tpData, singleton, update, new IRequirementChange[] {change1, change2, change3}, scope, null, metaRequirements);
return iu;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/expression/FilterTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/expression/FilterTest.java
index bd7d70f27..9c72c15a7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/expression/FilterTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/expression/FilterTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -115,7 +115,7 @@ public class FilterTest extends TestCase {
assertTrue("does not match filter", f1.match(hash)); //$NON-NLS-1$
assertTrue("does not match filter", f1.match(new DictionaryServiceReference(hash))); //$NON-NLS-1$
- comp = new Long(42);
+ comp = Long.valueOf(42);
hash.put("comparable", comp); //$NON-NLS-1$
assertTrue("does not match filter", f1.match(hash)); //$NON-NLS-1$
assertTrue("does not match filter", f1.match(new DictionaryServiceReference(hash))); //$NON-NLS-1$
@@ -128,7 +128,7 @@ public class FilterTest extends TestCase {
assertTrue("does not match filter", f2.match(hash)); //$NON-NLS-1$
assertTrue("does not match filter", f2.match(new DictionaryServiceReference(hash))); //$NON-NLS-1$
- comp = new Long(42);
+ comp = Long.valueOf(42);
hash.put("comparable", comp); //$NON-NLS-1$
assertTrue("does not match filter", f2.match(hash)); //$NON-NLS-1$
assertTrue("does not match filter", f2.match(new DictionaryServiceReference(hash))); //$NON-NLS-1$
@@ -139,16 +139,16 @@ public class FilterTest extends TestCase {
public void testFilter() {
Properties props = new Properties();
props.put("room", "bedroom"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("channel", new Integer(34)); //$NON-NLS-1$
+ props.put("channel", Integer.valueOf(34)); //$NON-NLS-1$
props.put("status", "(on\\)*"); //$NON-NLS-1$//$NON-NLS-2$
- props.put("max record time", new Long(150)); //$NON-NLS-1$
+ props.put("max record time", Long.valueOf(150)); //$NON-NLS-1$
props.put("canrecord", "true(x)"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("shortvalue", new Short((short) 1000)); //$NON-NLS-1$
- props.put("bytevalue", new Byte((byte) 10)); //$NON-NLS-1$
- props.put("floatvalue", new Float(1.01)); //$NON-NLS-1$
- props.put("doublevalue", new Double(2.01)); //$NON-NLS-1$
- props.put("charvalue", new Character('A')); //$NON-NLS-1$
- props.put("booleanvalue", new Boolean(false)); //$NON-NLS-1$
+ props.put("shortvalue", Short.valueOf((short) 1000)); //$NON-NLS-1$
+ props.put("bytevalue", Byte.valueOf((byte) 10)); //$NON-NLS-1$
+ props.put("floatvalue", Float.valueOf(1.01f)); //$NON-NLS-1$
+ props.put("doublevalue", Double.valueOf(2.01)); //$NON-NLS-1$
+ props.put("charvalue", Character.valueOf('A')); //$NON-NLS-1$
+ props.put("booleanvalue", Boolean.FALSE); //$NON-NLS-1$
props.put("weirdvalue", new Hashtable()); //$NON-NLS-1$
try {
props.put("bigintvalue", new BigInteger("4123456")); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
index f1f38f070..d0fabf593 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
@@ -443,7 +443,7 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
*/
public void cleanup() throws Exception {
// rm -rf eclipse sub-dir
- boolean leaveDirty = Boolean.valueOf(TestActivator.getContext().getProperty("p2.tests.doNotClean")).booleanValue();
+ boolean leaveDirty = Boolean.parseBoolean(TestActivator.getContext().getProperty("p2.tests.doNotClean"));
if (leaveDirty)
return;
for (Iterator iter = toRemove.iterator(); iter.hasNext();) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
index d48c8a6d9..5e14cf70c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -147,10 +147,10 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
IInstallableUnit[] bundleIUs = EclipsePublisherHelper.createEclipseIU(partialIUBundleDescription, false, key, extraProperties);
assertTrue(bundleIUs != null && bundleIUs.length != 0);
IInstallableUnit iu = bundleIUs[0];
- assertTrue(Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue());
+ assertTrue(Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)));
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
IInstallableUnit fullIU = touchpoint.prepareIU(getAgent(), profile, iu, key);
- assertFalse(Boolean.valueOf(fullIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue());
+ assertFalse(Boolean.parseBoolean(fullIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)));
}
public void testInstallPartialIU() throws Exception {
@@ -185,7 +185,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
IInstallableUnit[] bundleIUs = EclipsePublisherHelper.createEclipseIU(partialIUBundleDescription, false, key, extraProperties);
assertTrue(bundleIUs != null && bundleIUs.length != 0);
IInstallableUnit iu = bundleIUs[0];
- assertTrue(Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue());
+ assertTrue(Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)));
Iterator iterator = profile.query(QueryUtil.createIUQuery(iu.getId()), null).iterator();
assertFalse(iterator.hasNext());
@@ -202,7 +202,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
assertTrue(iterator.hasNext());
IInstallableUnit installedIU = (IInstallableUnit) iterator.next();
assertTrue(installedIU.getId().equals(iu.getId()));
- assertFalse(Boolean.valueOf(installedIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue());
+ assertFalse(Boolean.parseBoolean(installedIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)));
}
public void testInstallPartialIUValidationFailure() throws ProvisionException {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
index 04568f448..4df2e68cc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -88,7 +88,7 @@ public class UninstallFeatureActionTest extends AbstractProvisioningTest {
// Note: This is from code in InstallFeatureAction
String pluginId = iu.getProperty(UPDATE_FEATURE_PLUGIN_PROP);
- boolean isPrimary = Boolean.valueOf(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP)).booleanValue();
+ boolean isPrimary = Boolean.parseBoolean(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP));
String application = iu.getProperty(UPDATE_FEATURE_APPLICATION_PROP);
// TODO this isn't right... but we will leave it for now because we don't actually use the value in the install
String pluginVersion = key.getVersion().toString();
@@ -102,4 +102,4 @@ public class UninstallFeatureActionTest extends AbstractProvisioningTest {
action.undo(parameters);
assertTrue(configuration.containsFeature(siteURI, feature.getId(), feature.getVersion()));
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
index d9ac5250d..bd2c0e508 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -181,7 +181,7 @@ public class EclipseTouchpoint extends Touchpoint {
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- if (iu != null && Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue()) {
+ if (iu != null && Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU))) {
IInstallableUnit preparedIU = prepareIU(agent, profile, iu, artifactKey);
if (preparedIU == null)
return Util.createError(NLS.bind(Messages.failed_prepareIU, iu));
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
index 38daa59a6..9ebba6b17 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -73,10 +73,10 @@ public class InstallFeatureAction extends ProvisioningAction {
return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
}
String pluginId = iu.getProperty(UPDATE_FEATURE_PLUGIN_PROP);
- boolean isPrimary = Boolean.valueOf(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP)).booleanValue();
+ boolean isPrimary = Boolean.parseBoolean(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP));
String application = iu.getProperty(UPDATE_FEATURE_APPLICATION_PROP);
// TODO this isn't right... but we will leave it for now because we don't actually use the value in the install
String pluginVersion = artifactKey.getVersion().toString();
return configuration.addFeatureEntry(file, featureId, featureVersion, pluginId, pluginVersion, isPrimary, application, /*root*/null, iu.getProperty(Site.PROP_LINK_FILE));
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
index 494ccb56f..ccf225b69 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -50,7 +50,7 @@ public class LinkAction extends ProvisioningAction {
String force = (String) parameters.get(ActionConstants.PARM_LINK_FORCE);
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue());
+ ln(targetDir, linkTarget, linkName, Boolean.parseBoolean(force));
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
index 832c147ad..d6bde28d7 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -57,8 +57,8 @@ public class MarkStartedAction extends ProvisioningAction {
BundleInfo[] bundles = manipulator.getConfigData().getBundles();
for (int i = 0; i < bundles.length; i++) {
if (bundles[i].equals(bundleInfo)) {
- getMemento().put(ActionConstants.PARM_PREVIOUS_STARTED, new Boolean(bundles[i].isMarkedAsStarted()));
- bundles[i].setMarkedAsStarted(Boolean.valueOf(started).booleanValue());
+ getMemento().put(ActionConstants.PARM_PREVIOUS_STARTED, Boolean.valueOf(bundles[i].isMarkedAsStarted()));
+ bundles[i].setMarkedAsStarted(Boolean.parseBoolean(started));
break;
}
}
@@ -96,4 +96,4 @@ public class MarkStartedAction extends ProvisioningAction {
}
return Status.OK_STATUS;
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
index 06181cecd..525ceccc1 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -136,7 +136,7 @@ abstract class RepositoryAction extends ProvisioningAction {
String name = (String) parameters.get(ActionConstants.PARM_REPOSITORY_NICKNAME);
//default is to be enabled
String enablement = (String) parameters.get(ActionConstants.PARM_REPOSITORY_ENABLEMENT);
- boolean enabled = enablement == null ? true : Boolean.valueOf(enablement).booleanValue();
+ boolean enabled = enablement == null ? true : Boolean.parseBoolean(enablement);
return RepositoryEvent.newDiscoveryEvent(location, name, type, enabled);
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
index ae3e2c3c4..da32cc115 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -72,7 +72,7 @@ public class ConfigurationParser implements ConfigurationConstants {
// get primary flag
String flag = getAttribute(node, ATTRIBUTE_PRIMARY);
- if (flag != null && Boolean.valueOf(flag).booleanValue())
+ if (flag != null && Boolean.parseBoolean(flag))
result.setPrimary(true);
// get install locations
@@ -123,10 +123,10 @@ public class ConfigurationParser implements ConfigurationConstants {
result.setPolicy(policy);
String enabled = getAttribute(node, ATTRIBUTE_ENABLED);
if (enabled != null)
- result.setEnabled(Boolean.valueOf(enabled).booleanValue());
+ result.setEnabled(Boolean.parseBoolean(enabled));
String updateable = getAttribute(node, ATTRIBUTE_UPDATEABLE);
if (updateable != null)
- result.setUpdateable(Boolean.valueOf(updateable).booleanValue());
+ result.setUpdateable(Boolean.parseBoolean(updateable));
String url = getAttribute(node, ATTRIBUTE_URL);
if (url != null) {
try {
@@ -253,7 +253,7 @@ public class ConfigurationParser implements ConfigurationConstants {
result.setDate(value);
value = getAttribute(node, ATTRIBUTE_TRANSIENT);
if (value != null)
- result.setTransient(Boolean.valueOf(value).booleanValue());
+ result.setTransient(Boolean.parseBoolean(value));
value = getAttribute(node, ATTRIBUTE_SHARED_UR);
if (value != null)
result.setSharedUR(value);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
index 51915e736..2983d3512 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2015 Cloudsmith Inc. 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
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-import java.io.File;
-
import java.io.*;
import java.util.ArrayList;
import java.util.Map;
@@ -74,7 +72,7 @@ public class CopyAction extends ProvisioningAction {
File targetFile = new File(target);
File[] copiedFiles = null;
try {
- copiedFiles = mergeCopy(sourceFile, targetFile, Boolean.valueOf(overwrite).booleanValue(), backupStore);
+ copiedFiles = mergeCopy(sourceFile, targetFile, Boolean.parseBoolean(overwrite), backupStore);
} catch (IOException e) {
return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.copy_failed, sourceFile.getPath()), e);
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
index 4b99ed746..03a591f70 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -39,7 +39,7 @@ public class LinkAction extends ProvisioningAction {
IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
try {
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue(), store);
+ ln(targetDir, linkTarget, linkName, Boolean.parseBoolean(force), store);
} catch (IOException e) {
return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.link_failed, linkName, ID), e);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
index c85c9404a..490b8fb8a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies and others.
+ * Copyright (c) 2010, 2015 Tasktop Technologies 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
@@ -118,7 +118,7 @@ public class TextSearchControl extends Composite {
if (useNativeSearchField == null || !useNativeSearchField) {
findControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(FIND_ICON), "Find", "Find", ICON_SEARCH);
- clearControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(CLEAR_ICON), WorkbenchMessages.FilteredTree_ClearToolTip,//FilteredTree_AccessibleListenerClearButton,
+ clearControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(CLEAR_ICON), WorkbenchMessages.FilteredTree_ClearToolTip, //FilteredTree_AccessibleListenerClearButton,
WorkbenchMessages.FilteredTree_ClearToolTip, ICON_CANCEL);
addModifyListener(new ModifyListener() {
@@ -177,7 +177,7 @@ public class TextSearchControl extends Composite {
style |= ICON_SEARCH;
}
testText = new Text(parent, style);
- useNativeSearchField = new Boolean((testText.getStyle() & ICON_CANCEL) != 0 && (!automaticFind || (testText.getStyle() & ICON_SEARCH) != 0));
+ useNativeSearchField = Boolean.valueOf((testText.getStyle() & ICON_CANCEL) != 0 && (!automaticFind || (testText.getStyle() & ICON_SEARCH) != 0));
} finally {
if (testText != null) {
testText.dispose();
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 904ee9d70..33c6ea276 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2014 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -192,7 +192,7 @@ public class AutomaticUpdater implements IUpdateListener {
if (value != null)
lock = Integer.parseInt(value);
value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
- isRoot = value == null ? false : Boolean.valueOf(value).booleanValue();
+ isRoot = value == null ? false : Boolean.parseBoolean(value);
} catch (NumberFormatException e) {
// ignore and assume no lock
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
index ac8a7bcc8..0c6f8763f 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 WindRiver Corporation and others.
+ * Copyright (c) 2011, 2015 WindRiver 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
@@ -870,7 +870,7 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
}
private static boolean hasHigherFidelity(IInstallableUnit iu, IInstallableUnit currentIU) {
- if (Boolean.valueOf(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue() && !Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue())
+ if (Boolean.parseBoolean(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)) && !Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)))
return true;
return false;
}
@@ -937,4 +937,4 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
return updateToLatest;
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
index 5d5557474..1f6c53449 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -83,7 +83,7 @@ public class UpdateWizard extends WizardWithLicenses {
}
private boolean isLocked(IProfile profile, IInstallableUnit iuToBeUpdated) {
- return Boolean.valueOf(profile.getInstallableUnitProperty(iuToBeUpdated, IProfile.PROP_PROFILE_LOCKED_IU)).booleanValue();
+ return Boolean.parseBoolean(profile.getInstallableUnitProperty(iuToBeUpdated, IProfile.PROP_PROFILE_LOCKED_IU));
}
public void deselectLockedIUs() {
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
index e5c14ef48..f28d76f60 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -110,7 +110,7 @@ public class DefaultSiteParser extends DefaultHandler {
|| associateSitesURL.startsWith("https://") //$NON-NLS-1$
|| associateSitesURL.startsWith("file://") //$NON-NLS-1$
|| associateSitesURL.startsWith("ftp://") //$NON-NLS-1$
- || associateSitesURL.startsWith("jar://"))) //$NON-NLS-1$
+ || associateSitesURL.startsWith("jar://"))) //$NON-NLS-1$
log(Messages.DefaultSiteParser_mirrors, e);
return null;
}
@@ -832,7 +832,7 @@ public class DefaultSiteParser extends DefaultHandler {
}
String pack200 = attributes.getValue("pack200"); //$NON-NLS-1$
- if (pack200 != null && new Boolean(pack200).booleanValue()) {
+ if (pack200 != null && Boolean.parseBoolean(pack200)) {
site.setSupportsPack200(true);
}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index b4220492c..fae7326ed 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -525,7 +525,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
}
Utils.appendProperties(properties, manipulator.getConfigData().getProperties());
- boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
+ boolean exclusiveInstallation = Boolean.parseBoolean(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION));
File configFile = getConfigFile(manipulator);
File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
index 4a3a25745..94355c254 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
@@ -287,7 +287,7 @@ class ConfigApplier {
ArrayList<Bundle> toRefresh = new ArrayList<Bundle>();
String useReferenceProperty = manipulatingContext.getProperty(SimpleConfiguratorConstants.PROP_KEY_USE_REFERENCE);
- boolean useReference = useReferenceProperty == null ? runningOnEquinox : Boolean.valueOf(useReferenceProperty).booleanValue();
+ boolean useReference = useReferenceProperty == null ? runningOnEquinox : Boolean.parseBoolean(useReferenceProperty);
for (int i = 0; i < finalList.length; i++) {
if (finalList[i] == null)
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
index b888f29b1..5c68ab0a4 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -196,7 +196,7 @@ public class SimpleConfiguratorImpl implements Configurator {
String value = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_EXCLUSIVE_INSTALLATION);
if (value == null || value.trim().length() == 0)
value = "true";
- return Boolean.valueOf(value).booleanValue();
+ return Boolean.parseBoolean(value);
}
public void applyConfiguration() throws IOException {
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
index 77106d257..a61a9faea 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -61,14 +61,14 @@ public class ConfiguratorCommandProvider implements CommandProvider {
public Object _help(CommandInterpreter intp) {
String commandName = intp.nextArgument();
if (commandName == null) {
- return new Boolean(false);
+ return Boolean.FALSE;
}
String help = getHelp(commandName);
if (help.length() > 0) {
return help;
}
- return new Boolean(false);
+ return Boolean.FALSE;
}
public String getHelp() {
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
index ab69b8856..e5ceced3b 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 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 http://www.eclipse.org/legal/epl-v10.html
@@ -284,7 +284,7 @@ public class SimpleConfiguratorUtils {
String version = tok.nextToken().trim();
URI location = parseLocation(tok.nextToken().trim());
int startLevel = Integer.parseInt(tok.nextToken().trim());
- boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue();
+ boolean markedAsStarted = Boolean.parseBoolean(tok.nextToken());
BundleInfo result = new BundleInfo(symbolicName, version, location, startLevel, markedAsStarted);
if (!location.isAbsolute())
result.setBaseLocation(base);

Back to the top