Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2016-03-15 21:30:35 -0400
committerAlex Blewitt2016-04-19 04:34:01 -0400
commitbff55f297a5c1f61add01419da9671cfea908c46 (patch)
treec1438bc3be529485b3965a66c4a4cc1893d2320c
parent30aa50233fe07edc71b6729f7690454170215932 (diff)
downloadrt.equinox.p2-bff55f297a5c1f61add01419da9671cfea908c46.tar.gz
rt.equinox.p2-bff55f297a5c1f61add01419da9671cfea908c46.tar.xz
rt.equinox.p2-bff55f297a5c1f61add01419da9671cfea908c46.zip
Bug 489706 - Replace new Integer() with Integer.valueOf()I20160419-0800
There are a lot of new Integer() calls in the P2 codebase, which results in many duplicate values of Integer being stored, particularly when performing updates or checks. Integer.valueOf() performs this caching already, which means that it's unnecessary to call new Integer() and instead can call Integer.valueOf(). In the places where the int value is being used directly, the call can be further optimised to Integer.parseInt() instead. Replace calls to new Integer() with Integer.valueOf() or .parseInt() as appropriate. Change-Id: Ic760e66084c856fc90cb7c8a358007c975213638 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java4
-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.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.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.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.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/ProfileParser.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.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/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RemediationTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/EvaluatorTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativePackageExtractionApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java58
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java6
49 files changed, 191 insertions, 192 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
index 6cdf21b77..736d71b61 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -396,9 +396,9 @@ public class Utils {
public static BundleInfo[] sortBundleInfos(BundleInfo[] bInfos, int initialBSL) {
SortedMap<Integer, List<BundleInfo>> bslToList = new TreeMap<Integer, List<BundleInfo>>();
for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
+ Integer sL = Integer.valueOf(bInfos[i].getStartLevel());
if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialBSL);
+ sL = Integer.valueOf(initialBSL);
List<BundleInfo> list = bslToList.get(sL);
if (list == null) {
list = new LinkedList<BundleInfo>();
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
index 5105b6384..a0455ef14 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2016 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
@@ -19,7 +19,7 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
public class Application extends OptimizerApplication {
//Application return code
- private static final Integer NON_WRITTABLE_REPOSITORY = new Integer(-1);
+ private static final Integer NON_WRITTABLE_REPOSITORY = -1;
//Application arguments
private static final String ARTIFACT_REPOSITORY_ARG = "-artifactRepository"; //$NON-NLS-1$
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 018ce3ac0..5d63e9780 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, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -33,7 +33,7 @@ import org.eclipse.osgi.util.NLS;
public class CompositeArtifactRepository extends AbstractArtifactRepository implements ICompositeRepository<IArtifactKey> {
static final public String REPOSITORY_TYPE = CompositeArtifactRepository.class.getName();
- static final private Integer REPOSITORY_VERSION = new Integer(1);
+ static final private Integer REPOSITORY_VERSION = 1;
static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
static final public String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
static final public String CONTENT_FILENAME = "compositeArtifacts"; //$NON-NLS-1$
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 308419a91..b9bf5864a 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -233,7 +233,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
static final private String REPOSITORY_TYPE = IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY;
- static final private Integer REPOSITORY_VERSION = new Integer(1);
+ static final private Integer REPOSITORY_VERSION = 1;
private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
protected Set<SimpleArtifactDescriptor> artifactDescriptors = new HashSet<SimpleArtifactDescriptor>();
/**
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
index 9208cb3f3..ff7e45fa1 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -425,7 +425,7 @@ public class SimpleArtifactRepositoryIO {
public MappingRulesHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, MAPPING_RULES_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- mappingRules = (size != null ? new ArrayList<String[]>(new Integer(size).intValue()) : new ArrayList<String[]>(4));
+ mappingRules = (size != null ? new ArrayList<String[]>(Integer.parseInt(size)) : new ArrayList<String[]>(4));
}
public String[][] getMappingRules() {
@@ -467,7 +467,7 @@ public class SimpleArtifactRepositoryIO {
public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, ARTIFACTS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new LinkedHashSet<SimpleArtifactDescriptor>(new Integer(size).intValue()) : new LinkedHashSet<SimpleArtifactDescriptor>(4));
+ artifacts = (size != null ? new LinkedHashSet<SimpleArtifactDescriptor>(Integer.parseInt(size)) : new LinkedHashSet<SimpleArtifactDescriptor>(4));
}
public Set<SimpleArtifactDescriptor> getArtifacts() {
@@ -550,7 +550,7 @@ public class SimpleArtifactRepositoryIO {
public ProcessingStepsHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, PROCESSING_STEPS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- processingSteps = (size != null ? new ArrayList<IProcessingStepDescriptor>(new Integer(size).intValue()) : new ArrayList<IProcessingStepDescriptor>(4));
+ processingSteps = (size != null ? new ArrayList<IProcessingStepDescriptor>(Integer.parseInt(size)) : new ArrayList<IProcessingStepDescriptor>(4));
}
public IProcessingStepDescriptor[] getProcessingSteps() {
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
index ede8c0187..d2e851dd3 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -37,7 +37,7 @@ public class DefaultAgentProvider implements IProvisioningAgentProvider {
properties.put("locationURI", String.valueOf(agentLocation.getRootLocation())); //$NON-NLS-1$
//make the currently running system have a higher service ranking
if (location == null) {
- properties.put(Constants.SERVICE_RANKING, new Integer(100));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(100));
properties.put(IProvisioningAgent.SERVICE_CURRENT, Boolean.TRUE.toString());
}
ServiceRegistration<IProvisioningAgent> reg = context.registerService(IProvisioningAgent.class, result, properties);
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 4984f2be6..567a2f857 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -156,7 +156,7 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
private static final CommandLineOption OPTION_DOWNLOAD_ONLY = new CommandLineOption(new String[] {"-downloadOnly"}, null, Messages.Help_Download_Only); //$NON-NLS-1$
private static final CommandLineOption OPTION_IGNORED = new CommandLineOption(new String[] {"-showLocation", "-eclipse.password", "-eclipse.keyring"}, null, ""); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
- private static final Integer EXIT_ERROR = new Integer(13);
+ private static final Integer EXIT_ERROR = 13;
static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
static private final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
@@ -1410,4 +1410,4 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
index f2aa2c04f..bf2f1bb3c 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2009, 2016 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
@@ -32,7 +32,7 @@ public class CatalogCategoryComparator implements Comparator<CatalogCategory> {
// don't have to worry about format, since they were already validated
// note that higher relevance appears first, thus the reverse order of
// the comparison.
- i = new Integer(r2).compareTo(new Integer(r1));
+ i = Integer.valueOf(r2).compareTo(Integer.valueOf(r1));
} else if (r1 == null && r2 != null) {
return 1;
} else if (r2 == null && r1 != null) {
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 01a9a98cf..4051a1ade 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, 2015 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -37,7 +37,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
private static final String FILE_SCHEME = "file"; //$NON-NLS-1$
private static final String DOT_PROFILE = ".profile"; //$NON-NLS-1$
public static final String TYPE = "org.eclipse.equinox.p2.engine.repo.metadataRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
+ public static final Integer VERSION = 1;
private IProfile profile;
private HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
index c30742040..eb55ae93d 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -161,7 +161,7 @@ public abstract class ProfileParser extends MetadataParser implements ProfileXML
public IUsPropertiesHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, IUS_PROPERTIES_ELEMENT);
String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- int size = (sizeStr != null ? new Integer(sizeStr).intValue() : 4);
+ int size = (sizeStr != null ? Integer.parseInt(sizeStr) : 4);
iusPropertiesMap = new LinkedHashMap<String, Map<String, String>>(size);
}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
index 1cc2a9ee3..342e33ee2 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -29,7 +29,7 @@ import org.osgi.framework.BundleContext;
public class ExtensionLocationArtifactRepository extends AbstractRepository<IArtifactKey> implements IFileArtifactRepository, Constants {
public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.artifactRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
+ public static final Integer VERSION = 1;
public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new String[] {"artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IFileArtifactRepository artifactRepository;
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
index dbf0b6ebf..8a2f0e4c5 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -30,7 +30,7 @@ import org.osgi.framework.BundleContext;
public class ExtensionLocationMetadataRepository extends AbstractMetadataRepository implements Constants {
public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.metadataRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
+ public static final Integer VERSION = 1;
public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList("artifacts.jar", "content.jar", "artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml", "compositeArtifacts.jar", "compositeContent.jar"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
IMetadataRepository metadataRepository;
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 08ab1273a..21b0eab46 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, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -40,7 +40,7 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
static final public boolean ATOMIC_LOADING_DEFAULT = Boolean.parseBoolean(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$
- static final private Integer REPOSITORY_VERSION = new Integer(1);
+ static final private Integer REPOSITORY_VERSION = 1;
static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
index 671a3245d..3b3e02728 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -42,7 +42,7 @@ public class LocalMetadataRepository extends AbstractMetadataRepository implemen
static final private String CONTENT_FILENAME = "content"; //$NON-NLS-1$
static final private String REPOSITORY_TYPE = LocalMetadataRepository.class.getName();
- static final private Integer REPOSITORY_VERSION = new Integer(1);
+ static final private Integer REPOSITORY_VERSION = 1;
static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
static final private String XML_EXTENSION = ".xml"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
index d8479c1b7..6a2c4285c 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -38,7 +38,7 @@ public class URLMetadataRepository extends AbstractMetadataRepository implements
protected Collection<IRepositoryReference> references;
public static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
private static final String REPOSITORY_TYPE = URLMetadataRepository.class.getName();
- private static final Integer REPOSITORY_VERSION = new Integer(1);
+ private static final Integer REPOSITORY_VERSION = 1;
transient protected URI content;
protected IUMap units = new IUMap();
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
index 390dbea9f..f0f808f4d 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -660,7 +660,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, ARTIFACT_KEYS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new ArrayList<IArtifactKey>(new Integer(size).intValue()) : new ArrayList<IArtifactKey>(4));
+ artifacts = (size != null ? new ArrayList<IArtifactKey>(Integer.parseInt(size)) : new ArrayList<IArtifactKey>(4));
}
public IArtifactKey[] getArtifactKeys() {
@@ -723,7 +723,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
public TouchpointDataHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, TOUCHPOINT_DATA_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- data = (size != null ? new ArrayList<TouchpointInstructionsHandler>(new Integer(size).intValue()) : new ArrayList<TouchpointInstructionsHandler>(4));
+ data = (size != null ? new ArrayList<TouchpointInstructionsHandler>(Integer.parseInt(size)) : new ArrayList<TouchpointInstructionsHandler>(4));
}
public ITouchpointData[] getTouchpointData() {
@@ -749,7 +749,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List<TouchpointInstructionsHandler> data) {
super(parentHandler, TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- instructions = (size != null ? new LinkedHashMap<String, ITouchpointInstruction>(new Integer(size).intValue()) : new LinkedHashMap<String, ITouchpointInstruction>(4));
+ instructions = (size != null ? new LinkedHashMap<String, ITouchpointInstruction>(Integer.parseInt(size)) : new LinkedHashMap<String, ITouchpointInstruction>(4));
}
public ITouchpointData getTouchpointData() {
@@ -818,7 +818,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
int severity;
try {
- severity = new Integer(values[severityIdx]).intValue();
+ severity = Integer.parseInt(values[severityIdx]);
} catch (NumberFormatException e) {
invalidAttributeValue(UPDATE_DESCRIPTOR_ELEMENT, UPDATE_DESCRIPTOR_SEVERITY, values[severityIdx]);
severity = IUpdateDescriptor.NORMAL;
@@ -852,7 +852,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
public LicensesHandler(ContentHandler parentHandler, Attributes attributes) {
super(parentHandler, LICENSES_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- licenses = (size != null ? new ArrayList<ILicense>(new Integer(size).intValue()) : new ArrayList<ILicense>(2));
+ licenses = (size != null ? new ArrayList<ILicense>(Integer.parseInt(size)) : new ArrayList<ILicense>(2));
}
public ILicense[] getLicenses() {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
index bda16bc60..2a97d36d5 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -284,9 +284,9 @@ public class RequiredCapability implements IRequiredCapability, IMemberProvider
if (MEMBER_FILTER == memberName)
return filter;
if (MEMBER_MIN == memberName)
- return new Integer(min);
+ return Integer.valueOf(min);
if (MEMBER_MAX == memberName)
- return new Integer(max);
+ return Integer.valueOf(max);
if (MEMBER_GREEDY == memberName)
return Boolean.valueOf(greedy);
if (MEMBER_MATCH == memberName)
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
index a53ddbd3a..19ce082ed 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -1189,11 +1189,11 @@ class VersionFormatParser {
}
private VersionFormatException formatException(String message) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), new Integer(current), message}));
+ return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), Integer.valueOf(current), message}));
}
private VersionFormatException formatException(String found, String expected) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), new Integer(current), found, expected}));
+ return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), Integer.valueOf(current), found, expected}));
}
private VersionFormatException illegalControlCharacter(char c) {
@@ -1731,4 +1731,4 @@ class VersionFormatParser {
sb.append(c);
}
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
index 6a017aea3..b1eb3185f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2010, 2016 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
@@ -132,7 +132,7 @@ public abstract class CoercingComparator<T> {
if (v instanceof Integer)
return (Integer) v;
if (v instanceof Number)
- return new Integer(((Number) v).intValue());
+ return Integer.valueOf(((Number) v).intValue());
if (v instanceof String) {
try {
return Integer.valueOf(((String) v).trim());
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
index cfa9e2c11..e2e262086 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Cloudsmith Inc. and others.
+ * Copyright (c) 2011, 2016 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
@@ -190,7 +190,7 @@ public class ExpressionFactory implements IExpressionFactory, IExpressionConstan
}
public IExpression limit(IExpression collection, int count) {
- return new Limit((Expression) collection, Literal.create(new Integer(count)));
+ return new Limit((Expression) collection, Literal.create(Integer.valueOf(count)));
}
public IExpression matches(IExpression lhs, IExpression rhs) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
index 5a5a1e5f2..e60e6ed72 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -52,7 +52,7 @@ final class Limit extends Binary {
}
Limit(Expression operand, int limit) {
- this(operand, (Expression) ExpressionFactory.INSTANCE.constant(new Integer(limit)));
+ this(operand, (Expression) ExpressionFactory.INSTANCE.constant(Integer.valueOf(limit)));
}
public Object evaluate(IEvaluationContext context) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
index 59e82a0f2..15e8935f4 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -105,7 +105,6 @@ public abstract class Member extends Unary {
}
public static class LengthMember extends Member {
- private static final Integer ZERO = new Integer(0);
LengthMember(Expression operand) {
super(operand, "length", Expression.emptyArray); //$NON-NLS-1$
@@ -113,7 +112,7 @@ public abstract class Member extends Unary {
public Object evaluate(IEvaluationContext context) {
int len = getLength(operand.evaluate(context));
- return len == 0 ? ZERO : new Integer(len);
+ return Integer.valueOf(len);
}
int getLength(Object val) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
index f86a657a1..314cb7ad3 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2010, 2016 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
@@ -60,11 +60,11 @@ public class ExpressionParser extends Stack<IExpression> implements IExpressionC
protected static final Map<String, Integer> keywords;
static {
keywords = new HashMap<String, Integer>();
- keywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- keywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- keywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- keywords.put(KEYWORD_ALL, new Integer(TOKEN_ALL));
- keywords.put(KEYWORD_EXISTS, new Integer(TOKEN_EXISTS));
+ keywords.put(KEYWORD_FALSE, Integer.valueOf(TOKEN_FALSE));
+ keywords.put(KEYWORD_NULL, Integer.valueOf(TOKEN_NULL));
+ keywords.put(KEYWORD_TRUE, Integer.valueOf(TOKEN_TRUE));
+ keywords.put(KEYWORD_ALL, Integer.valueOf(TOKEN_ALL));
+ keywords.put(KEYWORD_EXISTS, Integer.valueOf(TOKEN_EXISTS));
}
protected final IExpressionFactory factory;
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
index c3faf8eb5..54589384b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -35,20 +35,20 @@ public class QLParser extends ExpressionParser {
static {
qlKeywords = new HashMap<String, Integer>();
qlKeywords.putAll(keywords);
- qlKeywords.put(KEYWORD_COLLECT, new Integer(TOKEN_COLLECT));
- qlKeywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- qlKeywords.put(KEYWORD_FIRST, new Integer(TOKEN_FIRST));
- qlKeywords.put(KEYWORD_FLATTEN, new Integer(TOKEN_FLATTEN));
- qlKeywords.put(KEYWORD_LATEST, new Integer(TOKEN_LATEST));
- qlKeywords.put(KEYWORD_LIMIT, new Integer(TOKEN_LIMIT));
- qlKeywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- qlKeywords.put(KEYWORD_SELECT, new Integer(TOKEN_SELECT));
- qlKeywords.put(KEYWORD_TRAVERSE, new Integer(TOKEN_TRAVERSE));
- qlKeywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- qlKeywords.put(KEYWORD_UNIQUE, new Integer(TOKEN_UNIQUE));
- qlKeywords.put(KEYWORD_INTERSECT, new Integer(TOKEN_INTERSECT));
- qlKeywords.put(KEYWORD_UNION, new Integer(TOKEN_UNION));
- qlKeywords.put(OPERATOR_EACH, new Integer(TOKEN_ANY));
+ qlKeywords.put(KEYWORD_COLLECT, Integer.valueOf(TOKEN_COLLECT));
+ qlKeywords.put(KEYWORD_FALSE, Integer.valueOf(TOKEN_FALSE));
+ qlKeywords.put(KEYWORD_FIRST, Integer.valueOf(TOKEN_FIRST));
+ qlKeywords.put(KEYWORD_FLATTEN, Integer.valueOf(TOKEN_FLATTEN));
+ qlKeywords.put(KEYWORD_LATEST, Integer.valueOf(TOKEN_LATEST));
+ qlKeywords.put(KEYWORD_LIMIT, Integer.valueOf(TOKEN_LIMIT));
+ qlKeywords.put(KEYWORD_NULL, Integer.valueOf(TOKEN_NULL));
+ qlKeywords.put(KEYWORD_SELECT, Integer.valueOf(TOKEN_SELECT));
+ qlKeywords.put(KEYWORD_TRAVERSE, Integer.valueOf(TOKEN_TRAVERSE));
+ qlKeywords.put(KEYWORD_TRUE, Integer.valueOf(TOKEN_TRUE));
+ qlKeywords.put(KEYWORD_UNIQUE, Integer.valueOf(TOKEN_UNIQUE));
+ qlKeywords.put(KEYWORD_INTERSECT, Integer.valueOf(TOKEN_INTERSECT));
+ qlKeywords.put(KEYWORD_UNION, Integer.valueOf(TOKEN_UNION));
+ qlKeywords.put(OPERATOR_EACH, Integer.valueOf(TOKEN_ANY));
}
public QLParser(IExpressionFactory factory) {
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
index 552e46240..f41a46b75 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -52,7 +52,7 @@ public class PlanAnalyzer {
case IStatusCodes.OPERATION_ALREADY_IN_PROGRESS :
return new Status(IStatus.ERROR, Activator.ID, statusCode, Messages.PlanAnalyzer_AnotherOperationInProgress, null);
default :
- return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_UnexpectedError, new Integer(statusCode), getIUString(affectedIU)), null);
+ return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_UnexpectedError, Integer.valueOf(statusCode), getIUString(affectedIU)), null);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
index 5e92d44b8..2866aa171 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -307,7 +307,7 @@ public abstract class AbstractPublisherApplication implements IApplication {
System.out.println(status.getMessage());
}
}
- return new Integer(1);
+ return Integer.valueOf(1);
}
protected abstract IPublisherAction[] createActions();
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java
index c514d2843..ea5da9041 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2008, 2016 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
@@ -19,7 +19,7 @@ public class Application implements IApplication {
Object obj = System.getProperties().get(Activator.PROP_APPLICATION_STATUS);
// if we have a non-OK status return "unlucky" 13, otherwise return the OK return code
if (obj != null && (obj instanceof IStatus) && !((IStatus) obj).isOK())
- return new Integer(13);
+ return Integer.valueOf(13);
return IApplication.EXIT_OK;
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java
index 4b05b0554..819b12b25 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -62,7 +62,7 @@ public class AntMirrorLog implements IArtifactMirrorLog {
*/
private void log(String message, int statusSeverity) {
try {
- log.invoke(task, new Object[] {message, new Integer(mapLogLevels(statusSeverity))});
+ log.invoke(task, new Object[] {message, Integer.valueOf(mapLogLevels(statusSeverity))});
} catch (IllegalArgumentException e) {
exceptionOccurred(message, e);
} catch (IllegalAccessException e) {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
index 02471aeed..8ac40ecb7 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -40,7 +40,7 @@ public class CompositeParser extends XMLParser implements XMLConstants {
public ChildrenHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, CHILDREN_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- children = (size != null ? new ArrayList<URI>(new Integer(size).intValue()) : new ArrayList<URI>(4));
+ children = (size != null ? new ArrayList<URI>(Integer.parseInt(size)) : new ArrayList<URI>(4));
}
public URI[] getChildren() {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
index a22475d63..abc7032fa 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -546,7 +546,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
line = this.locator.getLineNumber();
column = this.locator.getColumnNumber();
if (line > 0) {
- args = new Object[] {msg, root, name, new Integer(line), new Integer(column)};
+ args = new Object[] {msg, root, name, Integer.valueOf(line), Integer.valueOf(column)};
if (column > 0) {
key = (name != null ? Messages.XMLParser_Error_At_Name_Line_Column //
: Messages.XMLParser_Error_At_Line_Column);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
index b3de83058..851e491f4 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -74,7 +74,7 @@ public abstract class AbstractProvisioningUITest extends AbstractProvisioningTes
// register alternate services
SimpleLicenseManager manager = new SimpleLicenseManager(TESTPROFILE);
Dictionary<String, Object> properties = new Hashtable<String, Object>(5);
- properties.put(Constants.SERVICE_RANKING, new Integer(1));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(1));
regLicenseManager = TestActivator.getContext().registerService(LicenseManager.class.getName(), manager, properties);
profileElement = new ProfileElement(null, TESTPROFILE);
@@ -132,7 +132,7 @@ public abstract class AbstractProvisioningUITest extends AbstractProvisioningTes
req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
if (lock) {
- req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, new Integer(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE).toString());
+ req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.valueOf(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE).toString());
}
// Use an empty provisioning context to prevent repo access
ProvisioningContext context = new ProvisioningContext(getAgent());
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RemediationTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RemediationTest.java
index 1b8905e80..308e0b6cc 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RemediationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RemediationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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 RemediationTest extends WizardTest {
// register alternate services
SimpleLicenseManager manager = new SimpleLicenseManager(name);
Dictionary<String, Object> properties = new Hashtable<String, Object>(5);
- properties.put(Constants.SERVICE_RANKING, new Integer(1));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(1));
regLicenseManager = TestActivator.getContext().registerService(LicenseManager.class.getName(), manager, properties);
profileElement = new ProfileElement(null, name);
IULoader.loadIUs(this);
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
index 44fea0d3c..9995b6d45 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -78,7 +78,7 @@ public class VerifierApplication implements IApplication {
out.close();
LogHelper.log(result);
}
- return result.isOK() ? IApplication.EXIT_OK : new Integer(13);
+ return result.isOK() ? IApplication.EXIT_OK : Integer.valueOf(13);
}
/*
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
index 69fb0c3ec..d7ff11bbc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -258,7 +258,7 @@ public class ProfileTest extends AbstractProvisioningTest {
public ProfilesHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, PROFILES_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- profileHandlers = (size != null ? new HashMap(new Integer(size).intValue()) : new HashMap(4));
+ profileHandlers = (size != null ? new HashMap(Integer.parseInt(size)) : new HashMap(4));
}
public IProfile[] getProfiles() {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
index 24c0f0dd8..d87658d2f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -122,7 +122,7 @@ public class AllServerTests extends TestCase {
// We must ensure that our IServiceUI service wins because the SDK registers one declaratively
Hashtable properties = new Hashtable(1);
- properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ properties.put(org.osgi.framework.Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
certificateUIRegistration = context.registerService(UIServices.class.getName(), new DelegatingAuthService(), properties);
setUpCounter = 1;
@@ -189,4 +189,4 @@ public class AllServerTests extends TestCase {
return new TrustInfo(null, false, true);
}
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
index 6f57a9377..1ca2a3ad4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -422,10 +422,10 @@ public class RawVersionTest extends VersionTesting {
public void testArrayParsing() {
Version v = null;
assertNotNull(v = Version.create("raw:<1>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new Integer(1)}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {Integer.valueOf(1)}, null));
assertNotNull(v = Version.create("raw:<1.0>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new Integer(1), new Integer(0)}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {Integer.valueOf(1), Integer.valueOf(0)}, null));
assertNotNull(v = Version.create("raw:<'a'>"));
assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {"a"}, null));
@@ -437,19 +437,19 @@ public class RawVersionTest extends VersionTesting {
assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {"a", "bc"}, null));
assertNotNull(v = Version.create("raw:<1.2.-M>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new Integer(1), new Integer(2)}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {Integer.valueOf(1), Integer.valueOf(2)}, null));
assertNotNull(v = Version.create("raw:<1.2.m>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new Integer(1), new Integer(2), VersionVector.MAXS_VALUE}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {Integer.valueOf(1), Integer.valueOf(2), VersionVector.MAXS_VALUE}, null));
assertNotNull(v = Version.create("raw:<1.2.M>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new Integer(1), new Integer(2), VersionVector.MAX_VALUE}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {Integer.valueOf(1), Integer.valueOf(2), VersionVector.MAX_VALUE}, null));
assertNotNull(v = Version.create("raw:<<1>>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new VersionVector(new Comparable[] {new Integer(1)}, null)}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new VersionVector(new Comparable[] {Integer.valueOf(1)}, null)}, null));
assertNotNull(v = Version.create("raw:<<1.<2>>>"));
- assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new VersionVector(new Comparable[] {new Integer(1), new VersionVector(new Comparable[] {new Integer(2)}, null)}, null)}, null));
+ assertEquals(v.getSegment(0), new VersionVector(new Comparable[] {new VersionVector(new Comparable[] {Integer.valueOf(1), new VersionVector(new Comparable[] {Integer.valueOf(2)}, null)}, null)}, null));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/EvaluatorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/EvaluatorTest.java
index c103cc165..eb6b2b28e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/EvaluatorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/EvaluatorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -46,7 +46,7 @@ public class EvaluatorTest extends AbstractProvisioningTest {
public void testInstanceOf() throws Exception {
// Explicit instanceof when rhs is a class
IExpression expr = parser.parse("$0 ~= $1");
- assertEquals(Boolean.TRUE, expr.evaluate(factory.createContext(new Integer(4), Number.class)));
+ assertEquals(Boolean.TRUE, expr.evaluate(factory.createContext(Integer.valueOf(4), Number.class)));
}
public void testArray() throws Exception {
@@ -143,7 +143,7 @@ public class EvaluatorTest extends AbstractProvisioningTest {
IQueryResult result = repo.query(QueryUtil.createQuery("select(x | x.id ~= /tooling.*/).limit(1)"), new NullProgressMonitor());
assertEquals(queryResultSize(result), 1);
- result = repo.query(QueryUtil.createQuery("select(x | x.id ~= /tooling.*/).limit($0)", new Integer(2)), new NullProgressMonitor());
+ result = repo.query(QueryUtil.createQuery("select(x | x.id ~= /tooling.*/).limit($0)", Integer.valueOf(2)), new NullProgressMonitor());
assertEquals(queryResultSize(result), 2);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
index f42d57420..0018901bf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Cloudsmith and others.
+ * Copyright (c) 2009, 2016 Cloudsmith 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
@@ -94,7 +94,7 @@ public class TestServerController {
throw new IllegalStateException("Unable to start bundle " + BUNDLE_TESTSERVER);
// We must ensure that our IServiceUI service wins because the SDK registers one declaratively
Hashtable properties = new Hashtable(1);
- properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ properties.put(org.osgi.framework.Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
certificateUIRegistration = context.registerService(UIServices.class.getName(), new DelegatingAuthService(), properties);
setUpCounter = 1;
@@ -161,4 +161,4 @@ public class TestServerController {
return new TrustInfo(null, false, true);
}
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
index 5d8f47316..a9123506a 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Wind River and others.
+ * Copyright (c) 2012, 2016 Wind River 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 Stats extends HttpServlet {
private Map downloadStats = new HashMap();
public Stats() {
- downloadStats.put(UnkownPackage, new Integer(0));
+ downloadStats.put(UnkownPackage, Integer.valueOf(0));
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
@@ -97,9 +97,9 @@ public class Stats extends HttpServlet {
found = true;
Integer count = (Integer) downloadStats.get(paraPair[1]);
if (count == null) {
- count = new Integer(1);
+ count = Integer.valueOf(1);
} else
- count = new Integer(1 + count.intValue());
+ count = Integer.valueOf(1 + count.intValue());
downloadStats.put(paraPair[1], count);
break;
}
@@ -107,7 +107,7 @@ public class Stats extends HttpServlet {
}
if (!found) {
Integer count = (Integer) downloadStats.get(UnkownPackage);
- downloadStats.put(UnkownPackage, new Integer(1 + count.intValue()));
+ downloadStats.put(UnkownPackage, Integer.valueOf(1 + count.intValue()));
}
}
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
index 9452c7172..ea9b24a36 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -56,7 +56,7 @@ public class SetStartLevelAction 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_START_LEVEL, new Integer(bundles[i].getStartLevel()));
+ getMemento().put(ActionConstants.PARM_PREVIOUS_START_LEVEL, Integer.valueOf(bundles[i].getStartLevel()));
try {
bundles[i].setStartLevel(Integer.parseInt(startLevel));
} catch (NumberFormatException e) {
@@ -99,4 +99,4 @@ public class SetStartLevelAction extends ProvisioningAction {
}
return Status.OK_STATUS;
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
index 6f1e7c142..ed4c1e8b1 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Cloudsmith Inc. and others.
+ * Copyright (c) 2009, 2016 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
@@ -539,7 +539,7 @@ public class BackupStore implements IBackupStore {
try {
socket.close();
} catch (IOException e) { /* ignored */
- logWarning(NLS.bind(Messages.BackupStore_can_not_close_tcp_port, new Integer(socket.getLocalPort())));
+ logWarning(NLS.bind(Messages.BackupStore_can_not_close_tcp_port, Integer.valueOf(socket.getLocalPort())));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativePackageExtractionApplication.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativePackageExtractionApplication.java
index 6dc1f65c6..db9053052 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativePackageExtractionApplication.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativePackageExtractionApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 Rapicorp, Inc and others.
+ * Copyright (c) 2014, 2016 Rapicorp, 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
@@ -37,7 +37,7 @@ public class NativePackageExtractionApplication implements IApplication {
private static final String DEFAULT_VERSION_CONSTRAINT = "ge"; //$NON-NLS-1$
private static final String _ACTION_ID = "_action_id_"; //$NON-NLS-1$
private static final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
- private static final Integer EXIT_ERROR = new Integer(13);
+ private static final Integer EXIT_ERROR = 13;
//Constants for arguments
private static final String OPTION_TO_ANALYZE = "-toAnalyze"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
index 4c1414721..622c090ea 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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,10 +102,10 @@ public class CleanupzipAction extends ProvisioningAction {
if (f1 == null)
return 1;
try {
- return new Integer(f2.getCanonicalPath().length()).compareTo(f1.getCanonicalPath().length());
+ return Integer.valueOf(f2.getCanonicalPath().length()).compareTo(f1.getCanonicalPath().length());
} catch (IOException e) {
// did our best. try an absolute path compare
- return new Integer(f2.getAbsolutePath().length()).compareTo(f1.getAbsolutePath().length());
+ return Integer.valueOf(f2.getAbsolutePath().length()).compareTo(f1.getAbsolutePath().length());
}
}
@@ -142,4 +142,4 @@ public class CleanupzipAction extends ProvisioningAction {
}
return buffer.toString();
}
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
index 9db59789b..816bd7a2f 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and other.
+ * Copyright (c) 2006, 2016 IBM Corporation and others.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
@@ -277,13 +277,13 @@ public class RepositoryTransport extends Transport {
Integer retryCount = null;
if (socketExceptionRetry == null) {
socketExceptionRetry = new HashMap<URI, Integer>();
- retryCount = new Integer(1);
+ retryCount = Integer.valueOf(1);
} else {
Integer alreadyRetryCount = socketExceptionRetry.get(toDownload);
if (alreadyRetryCount == null)
- retryCount = new Integer(1);
+ retryCount = Integer.valueOf(1);
else if (alreadyRetryCount.intValue() < retry) {
- retryCount = new Integer(alreadyRetryCount.intValue() + 1);
+ retryCount = Integer.valueOf(alreadyRetryCount.intValue() + 1);
}
}
if (retryCount != null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java
index bf0743fe8..fc755e86d 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 WindRiver Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -65,7 +65,7 @@ public class P2FParser extends XMLParser implements P2FConstants {
public RepositoriesHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, REPOSITORIES_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- uris = (size == null) ? new ArrayList<URI>() : new ArrayList<URI>(new Integer(size).intValue());
+ uris = (size == null) ? new ArrayList<URI>() : new ArrayList<URI>(Integer.parseInt(size));
}
@Override
@@ -124,7 +124,7 @@ public class P2FParser extends XMLParser implements P2FConstants {
public IUsHandler(ContentHandler parentHandler, Attributes attributes) {
super(parentHandler, IUS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- ius = (size != null ? new ArrayList<IUDetail>(new Integer(size).intValue()) : new ArrayList<IUDetail>());
+ ius = (size != null ? new ArrayList<IUDetail>(Integer.parseInt(size)) : new ArrayList<IUDetail>());
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
index 1380cbce5..baad3f300 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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 abstract class ProfileModificationAction extends ProvisioningAction {
}
protected IStatus getNoProfileOrSelectionStatus(String id, Collection<IInstallableUnit> ius) {
- return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.size())));
+ return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, Integer.valueOf(ius.size())));
}
protected abstract ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius);
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
index e8a94ecb0..6871ab164 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -419,10 +419,10 @@ public class CategoryParser extends DefaultHandler {
private void handleCategoryDefState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_CATEGORY_DEF));
processInfo(attributes);
} else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -434,7 +434,7 @@ public class CategoryParser extends DefaultHandler {
private void handleFeatureState(String elementName, Attributes attributes) {
if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -442,7 +442,7 @@ public class CategoryParser extends DefaultHandler {
private void handleBundleState(String elementName, Attributes attributes) {
if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -450,7 +450,7 @@ public class CategoryParser extends DefaultHandler {
private void handleInitialState(String elementName, Attributes attributes) throws SAXException {
if (elementName.equals(SITE)) {
- stateStack.push(new Integer(STATE_SITE));
+ stateStack.push(Integer.valueOf(STATE_SITE));
processSite(attributes);
} else {
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -462,28 +462,28 @@ public class CategoryParser extends DefaultHandler {
private void handleSiteState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_SITE));
processInfo(attributes);
} else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
+ stateStack.push(Integer.valueOf(STATE_FEATURE));
processFeature(attributes);
} else if (elementName.equals(BUNDLE)) {
- stateStack.push(new Integer(STATE_BUNDLE));
+ stateStack.push(Integer.valueOf(STATE_BUNDLE));
processBundle(attributes);
} else if (elementName.equals(IU)) {
- stateStack.push(new Integer(STATE_IU));
+ stateStack.push(Integer.valueOf(STATE_IU));
processIU(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else if (elementName.equals(REPOSITORY_REF)) {
- stateStack.push(new Integer(STATE_REPOSITORY_REF));
+ stateStack.push(Integer.valueOf(STATE_REPOSITORY_REF));
processRepositoryReference(attributes);
} else if (elementName.equals(STATS_URI)) {
- stateStack.push(new Integer(STATE_STATS));
+ stateStack.push(Integer.valueOf(STATE_STATS));
processStatsInfo(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -502,10 +502,10 @@ public class CategoryParser extends DefaultHandler {
private void handleIUState(String elementName, Attributes attributes) {
if (elementName.equals(QUERY)) {
- stateStack.push(new Integer(STATE_QUERY));
+ stateStack.push(Integer.valueOf(STATE_QUERY));
processQuery(attributes);
} else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -513,10 +513,10 @@ public class CategoryParser extends DefaultHandler {
private void handleQueryState(String elementName, Attributes attributes) {
if (elementName.equals(EXPRESSION)) {
- stateStack.push(new Integer(STATE_EXPRESSION));
+ stateStack.push(Integer.valueOf(STATE_EXPRESSION));
processExpression(attributes);
} else if (elementName.equals(PARAM)) {
- stateStack.push(new Integer(STATE_PARAM));
+ stateStack.push(Integer.valueOf(STATE_PARAM));
processParam(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
@@ -541,7 +541,7 @@ public class CategoryParser extends DefaultHandler {
*
*/
private void internalErrorUnknownTag(String msg) {
- stateStack.push(new Integer(STATE_IGNORED_ELEMENT));
+ stateStack.push(Integer.valueOf(STATE_IGNORED_ELEMENT));
internalError(msg);
}
@@ -583,7 +583,7 @@ public class CategoryParser extends DefaultHandler {
* @since 2.0
*/
public SiteModel parse(InputStream in) throws SAXException, IOException {
- stateStack.push(new Integer(STATE_INITIAL));
+ stateStack.push(Integer.valueOf(STATE_INITIAL));
parser.parse(new InputSource(in), this);
if (objectStack.isEmpty())
throw new SAXException(Messages.DefaultSiteParser_NoSiteTag);
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 f28d76f60..be4972703 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, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -375,19 +375,19 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleCategoryDefState(String elementName, Attributes attributes) {
if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
+ stateStack.push(Integer.valueOf(STATE_FEATURE));
processFeature(attributes);
} else if (elementName.equals(BUNDLE)) {
- stateStack.push(new Integer(STATE_BUNDLE));
+ stateStack.push(Integer.valueOf(STATE_BUNDLE));
processBundle(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_CATEGORY_DEF));
processInfo(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -395,22 +395,22 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleCategoryState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_SITE));
processInfo(attributes);
} else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
+ stateStack.push(Integer.valueOf(STATE_FEATURE));
processFeature(attributes);
} else if (elementName.equals(BUNDLE)) {
- stateStack.push(new Integer(STATE_BUNDLE));
+ stateStack.push(Integer.valueOf(STATE_BUNDLE));
processBundle(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -418,19 +418,19 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleFeatureState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_SITE));
processInfo(attributes);
} else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
+ stateStack.push(Integer.valueOf(STATE_FEATURE));
processFeature(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -438,16 +438,16 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleBundleState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_SITE));
processInfo(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY));
processCategory(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -455,7 +455,7 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleInitialState(String elementName, Attributes attributes) throws SAXException {
if (elementName.equals(SITE)) {
- stateStack.push(new Integer(STATE_SITE));
+ stateStack.push(Integer.valueOf(STATE_SITE));
processSite(attributes);
} else {
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -467,19 +467,19 @@ public class DefaultSiteParser extends DefaultHandler {
private void handleSiteState(String elementName, Attributes attributes) {
if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+ stateStack.push(Integer.valueOf(STATE_DESCRIPTION_SITE));
processInfo(attributes);
} else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
+ stateStack.push(Integer.valueOf(STATE_FEATURE));
processFeature(attributes);
} else if (elementName.equals(BUNDLE)) {
- stateStack.push(new Integer(STATE_BUNDLE));
+ stateStack.push(Integer.valueOf(STATE_BUNDLE));
processBundle(attributes);
} else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
+ stateStack.push(Integer.valueOf(STATE_ARCHIVE));
processArchive(attributes);
} else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
+ stateStack.push(Integer.valueOf(STATE_CATEGORY_DEF));
processCategoryDef(attributes);
} else
internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
@@ -496,7 +496,7 @@ public class DefaultSiteParser extends DefaultHandler {
*
*/
private void internalErrorUnknownTag(String msg) {
- stateStack.push(new Integer(STATE_IGNORED_ELEMENT));
+ stateStack.push(Integer.valueOf(STATE_IGNORED_ELEMENT));
internalError(msg);
}
@@ -536,7 +536,7 @@ public class DefaultSiteParser extends DefaultHandler {
* @since 2.0
*/
public SiteModel parse(InputStream in) throws SAXException, IOException {
- stateStack.push(new Integer(STATE_INITIAL));
+ stateStack.push(Integer.valueOf(STATE_INITIAL));
currentState = stateStack.peek().intValue();
parser.parse(new InputSource(in), this);
if (objectStack.isEmpty())
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 fae7326ed..e684bc90a 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, 2015 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2016 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,9 +262,9 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
private SortedMap<Integer, List<BundleInfo>> getSortedMap(int initialSl, BundleInfo[] bInfos) {
SortedMap<Integer, List<BundleInfo>> bslToList = new TreeMap<Integer, List<BundleInfo>>();
for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
+ Integer sL = Integer.valueOf(bInfos[i].getStartLevel());
if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialSl);
+ sL = Integer.valueOf(initialSl);
List<BundleInfo> list = bslToList.get(sL);
if (list == null) {
list = new LinkedList<BundleInfo>();

Back to the top