Move away of deprecated Integer/Long constructors.
Deprecated in Java 9 and better(caching) valueOf method exists since
1.5.
Change-Id: I0e0a6f6b48c1ecaa1627b7775ede5627ec41a775
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
index f10ae0d..59c8a93 100644
--- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
+++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -30,12 +30,12 @@
/**
* Exit object indicating normal termination
*/
- public static final Integer EXIT_OK = new Integer(0);
+ public static final Integer EXIT_OK = Integer.valueOf(0);
/**
* Exit object requesting platform restart
*/
- public static final Integer EXIT_RESTART = new Integer(23);
+ public static final Integer EXIT_RESTART = Integer.valueOf(23);
/**
* Exit object requesting that the command passed back be executed. Typically
@@ -43,7 +43,7 @@
* relaunched the command line will be retrieved from the
* {@link IApplicationContext#EXIT_DATA_PROPERTY eclipse.exitdata} system property.
*/
- public static final Integer EXIT_RELAUNCH = new Integer(24);
+ public static final Integer EXIT_RELAUNCH = Integer.valueOf(24);
/**
* Starts this application with the given context and returns a result. The content of
diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java
index 121431f..288c54e 100644
--- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java
+++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -187,9 +187,9 @@
}
if (nextScheduledID == Integer.MAX_VALUE)
nextScheduledID = 0;
- String result = new Integer(nextScheduledID++).toString();
+ String result = Integer.valueOf(nextScheduledID++).toString();
while (scheduledApps.get(result) != null && nextScheduledID < Integer.MAX_VALUE)
- result = new Integer(nextScheduledID++).toString();
+ result = Integer.valueOf(nextScheduledID++).toString();
if (nextScheduledID == Integer.MAX_VALUE)
throw new ApplicationException(ApplicationException.APPLICATION_DUPLICATE_SCHEDULE_ID, "Maximum number of scheduled applications reached"); //$NON-NLS-1$
return result;
@@ -365,12 +365,12 @@
continue;
lastMin = minute;
Hashtable props = new Hashtable();
- props.put(ScheduledApplication.YEAR, new Integer(cal.get(Calendar.YEAR)));
- props.put(ScheduledApplication.MONTH, new Integer(cal.get(Calendar.MONTH)));
- props.put(ScheduledApplication.DAY_OF_MONTH, new Integer(cal.get(Calendar.DAY_OF_MONTH)));
- props.put(ScheduledApplication.DAY_OF_WEEK, new Integer(cal.get(Calendar.DAY_OF_WEEK)));
- props.put(ScheduledApplication.HOUR_OF_DAY, new Integer(cal.get(Calendar.HOUR_OF_DAY)));
- props.put(ScheduledApplication.MINUTE, new Integer(minute));
+ props.put(ScheduledApplication.YEAR, Integer.valueOf(cal.get(Calendar.YEAR)));
+ props.put(ScheduledApplication.MONTH, Integer.valueOf(cal.get(Calendar.MONTH)));
+ props.put(ScheduledApplication.DAY_OF_MONTH, Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH)));
+ props.put(ScheduledApplication.DAY_OF_WEEK, Integer.valueOf(cal.get(Calendar.DAY_OF_WEEK)));
+ props.put(ScheduledApplication.HOUR_OF_DAY, Integer.valueOf(cal.get(Calendar.HOUR_OF_DAY)));
+ props.put(ScheduledApplication.MINUTE, Integer.valueOf(minute));
Event timerEvent = new Event(ScheduledApplication.TIMER_TOPIC, (Dictionary) props);
EclipseScheduledApplication[] apps = null;
// poor mans implementation of dispatching events; the spec will not allow us to use event admin to dispatch the virtual timer events; boo!!
diff --git a/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF
index 2f32412..c2bd893 100755
--- a/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.console
-Bundle-Version: 1.3.100.qualifier
+Bundle-Version: 1.3.200.qualifier
Bundle-Activator: org.eclipse.equinox.console.command.adapter.Activator
Bundle-Vendor: %bundleVendor
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.console/pom.xml b/bundles/org.eclipse.equinox.console/pom.xml
index 18418f7..901da57 100644
--- a/bundles/org.eclipse.equinox.console/pom.xml
+++ b/bundles/org.eclipse.equinox.console/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.console</artifactId>
- <version>1.3.100-SNAPSHOT</version>
+ <version>1.3.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java
index 2aec243..fc7479f 100755
--- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java
+++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2017 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -173,7 +173,7 @@
converterReg = context.registerService(Converter.class.getName(), converter, null);
Dictionary<String, Object> props = new Hashtable<>();
- props.put(Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ props.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
props.put(CommandProcessor.COMMAND_SCOPE, "equinox");
props.put(CommandProcessor.COMMAND_FUNCTION, functions);
providerReg = context.registerService(EquinoxCommandProvider.class.getName(), this, props);
diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/HelpCommand.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/HelpCommand.java
index a4ba305..d13f227 100755
--- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/HelpCommand.java
+++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/HelpCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2017 SAP AG and others.
+ * Copyright (c) 2011, 2018 SAP AG and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -89,7 +89,7 @@
public void startService() {
Dictionary<String, Object> props = new Hashtable<>();
- props.put(Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ props.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
props.put(CommandProcessor.COMMAND_SCOPE, "equinox");
props.put(CommandProcessor.COMMAND_FUNCTION, new String[] {"help"});
context.registerService(HelpCommand.class.getName(), this, props);
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/CallRegistrator.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/CallRegistrator.java
index 1b54713..dcf266a 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/CallRegistrator.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/CallRegistrator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1997, 2010 by ProSyst Software GmbH
+ * Copyright (c) 1997, 2018 by ProSyst Software GmbH
* http://www.prosyst.com
*
* This program and the accompanying materials
@@ -137,7 +137,7 @@
}
Object prop = properties.get("config.base.data");
int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0;
- properties.put("config.base.data", new Integer(data | value));
+ properties.put("config.base.data", Integer.valueOf(data | value));
}
// Successors should override
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb13/org/eclipse/equinox/ds/tests/tb13/BindUnbindRegistrator.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb13/org/eclipse/equinox/ds/tests/tb13/BindUnbindRegistrator.java
index 41a11e0..b6c20f4 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb13/org/eclipse/equinox/ds/tests/tb13/BindUnbindRegistrator.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb13/org/eclipse/equinox/ds/tests/tb13/BindUnbindRegistrator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1997-2009 by ProSyst Software GmbH
+ * Copyright (c) 1997, 2018 by ProSyst Software GmbH
* http://www.prosyst.com
*
* This program and the accompanying materials
@@ -87,7 +87,7 @@
}
Object prop = properties.get("config.base.data");
int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0;
- properties.put("config.base.data", new Integer(data | value));
+ properties.put("config.base.data", Integer.valueOf(data | value));
}
public ComponentContext getComponentContext() {
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb15/org/eclipse/equinox/ds/tests/tb15/Component1.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb15/org/eclipse/equinox/ds/tests/tb15/Component1.java
index 7f7b9b8..811da56 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb15/org/eclipse/equinox/ds/tests/tb15/Component1.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb15/org/eclipse/equinox/ds/tests/tb15/Component1.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1997, 2010 by ProSyst Software GmbH
+ * Copyright (c) 1997, 2018 by ProSyst Software GmbH
* http://www.prosyst.com
*
* This program and the accompanying materials
@@ -48,7 +48,7 @@
protected void deactivate(ComponentContext ctxt) {
deactPos = deactCount++;
- properties.put("config.base.data", new Integer(deactPos));
+ properties.put("config.base.data", Integer.valueOf(deactPos));
}
public Dictionary getProperties() {
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21/org/eclipse/equinox/ds/tests/tb21/ModifyRegistrator.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21/org/eclipse/equinox/ds/tests/tb21/ModifyRegistrator.java
index 6f77ae1..cf79c8b 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21/org/eclipse/equinox/ds/tests/tb21/ModifyRegistrator.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21/org/eclipse/equinox/ds/tests/tb21/ModifyRegistrator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -93,7 +93,7 @@
}
Object prop = properties.get("config.base.data");
int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0;
- properties.put("config.base.data", new Integer(data | value));
+ properties.put("config.base.data", Integer.valueOf(data | value));
}
public ComponentContext getComponentContext() {
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21a/org/eclipse/equinox/ds/tests/tb21a/ModifyRegistrator.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21a/org/eclipse/equinox/ds/tests/tb21a/ModifyRegistrator.java
index b89fa67..f8b13ce 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21a/org/eclipse/equinox/ds/tests/tb21a/ModifyRegistrator.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb21a/org/eclipse/equinox/ds/tests/tb21a/ModifyRegistrator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -93,7 +93,7 @@
}
Object prop = properties.get("config.base.data");
int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0;
- properties.put("config.base.data", new Integer(data | value));
+ properties.put("config.base.data", Integer.valueOf(data | value));
}
public ComponentContext getComponentContext() {
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb23/org/eclipse/equinox/ds/tests/tb23/BindRegistrator.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb23/org/eclipse/equinox/ds/tests/tb23/BindRegistrator.java
index c928a34..3887a34 100644
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb23/org/eclipse/equinox/ds/tests/tb23/BindRegistrator.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb23/org/eclipse/equinox/ds/tests/tb23/BindRegistrator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -73,7 +73,7 @@
}
Object prop = properties.get("config.base.data");
int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0;
- properties.put("config.base.data", new Integer(data | value));
+ properties.put("config.base.data", Integer.valueOf(data | value));
}
public ComponentContext getComponentContext() {
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
index 9c9f665..c423ba6 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
@@ -3024,7 +3024,7 @@
contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/a");
contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_INIT_PARAM_PREFIX + "a", "a");
contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_INIT_PARAM_PREFIX + "b", "b");
- contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_INIT_PARAM_PREFIX + "c", new Integer(1));
+ contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_INIT_PARAM_PREFIX + "c", Integer.valueOf(1));
registrations.add(bundleContext.registerService(ServletContextHelper.class, servletContextHelper, contextProps));
Dictionary<String, String> servletProps1 = new Hashtable<String, String>();
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/TestServletPrototype.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/TestServletPrototype.java
index 2c73711..bc537b3 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/TestServletPrototype.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/TestServletPrototype.java
@@ -129,7 +129,7 @@
// Update ranking
String serviceRanking = request.getParameter(Constants.SERVICE_RANKING);
if (serviceRanking != null) {
- serviceProps.put(Constants.SERVICE_RANKING, new Integer(serviceRanking));
+ serviceProps.put(Constants.SERVICE_RANKING, Integer.valueOf(serviceRanking));
}
// Update context selection
String contextSelect = request.getParameter(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT);
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/CombinedEventDelta.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/CombinedEventDelta.java
index f840a12..98ccce1 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/CombinedEventDelta.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/CombinedEventDelta.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -109,14 +109,14 @@
public void rememberExtensionPoint(ExtensionPoint extensionPoint) {
String bucketId = extensionPoint.getUniqueIdentifier();
- Integer extPt = new Integer(extensionPoint.getObjectId());
+ Integer extPt = Integer.valueOf(extensionPoint.getObjectId());
getExtPointsBucket(bucketId).add(extPt);
getExtPointsGlobal().add(extPt);
}
public void rememberExtension(ExtensionPoint extensionPoint, int ext) {
String bucketId = extensionPoint.getUniqueIdentifier();
- Integer extension = new Integer(ext);
+ Integer extension = Integer.valueOf(ext);
getExtensionsBucket(bucketId).add(extension);
getExtensionsGlobal().add(extension);
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
index 7363b7a..fa58c96 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -1367,7 +1367,7 @@
else
namespace = removeExtension(id);
Map<Integer, RegistryObject> removed = new HashMap<>(1);
- removed.put(new Integer(id), registryObject);
+ removed.put(Integer.valueOf(id), registryObject);
// There is some asymmetry between extension and extension point removal. Removing extension point makes
// extensions "orphans" but does not remove them. As a result, only extensions needs to be processed.
if (!isExtensionPoint)
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
index 3d1a890..8a84076 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -314,7 +314,7 @@
private void handleExtensionPointState(String elementName) {
// We ignore all elements under extension points (if there are any)
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
unknownElement(EXTENSION_POINT, elementName);
}
@@ -326,7 +326,7 @@
// its parent configuration element object. However, the first configuration
// element object we created (the last one we pop off the stack) will need to
// be added to a vector in the extension object called _configuration.
- stateStack.push(new Integer(CONFIGURATION_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(CONFIGURATION_ELEMENT_STATE));
configurationElementValue = null;
@@ -349,25 +349,25 @@
// new manifests should have the plugin (or fragment) element empty
// in compatibility mode, any extraneous elements will be silently ignored
compatibilityMode = attributes.getLength() > 0;
- stateStack.push(new Integer(BUNDLE_STATE));
+ stateStack.push(Integer.valueOf(BUNDLE_STATE));
objectStack.push(contribution);
}
private void handleBundleState(String elementName, Attributes attributes) {
if (elementName.equals(EXTENSION_POINT)) {
- stateStack.push(new Integer(BUNDLE_EXTENSION_POINT_STATE));
+ stateStack.push(Integer.valueOf(BUNDLE_EXTENSION_POINT_STATE));
parseExtensionPointAttributes(attributes);
return;
}
if (elementName.equals(EXTENSION)) {
- stateStack.push(new Integer(BUNDLE_EXTENSION_STATE));
+ stateStack.push(Integer.valueOf(BUNDLE_EXTENSION_STATE));
parseExtensionAttributes(attributes);
return;
}
// If we get to this point, the element name is one we don't currently accept.
// Set the state to indicate that this element will be ignored
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
if (!compatibilityMode)
unknownElement(PLUGIN, elementName);
}
@@ -480,7 +480,7 @@
if (currentExtension.getExtensionPointIdentifier() == null) {
missingAttribute(EXTENSION_TARGET, EXTENSION);
stateStack.pop();
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
objectStack.pop();
return;
}
@@ -570,7 +570,7 @@
String attribute = currentExtPoint.getSimpleIdentifier() == null ? EXTENSION_POINT_ID : EXTENSION_POINT_NAME;
missingAttribute(attribute, EXTENSION_POINT);
stateStack.pop();
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
return;
}
if (!objectManager.addExtensionPoint(currentExtPoint, true)) {
@@ -582,7 +582,7 @@
registry.log(new Status(IStatus.ERROR, RegistryMessages.OWNER_NAME, 0, msg, null));
}
stateStack.pop();
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
return;
}
if (currentExtPoint.getNamespace() == null)
@@ -599,7 +599,7 @@
*/
@Override
public void startDocument() {
- stateStack.push(new Integer(INITIAL_STATE));
+ stateStack.push(Integer.valueOf(INITIAL_STATE));
for (int i = 0; i <= LAST_INDEX; i++) {
scratchVectors[i] = new ArrayList<>();
}
@@ -625,7 +625,7 @@
handleExtensionState(elementName, attributes);
break;
default :
- stateStack.push(new Integer(IGNORED_ELEMENT_STATE));
+ stateStack.push(Integer.valueOf(IGNORED_ELEMENT_STATE));
if (!compatibilityMode)
internalError(NLS.bind(RegistryMessages.parse_unknownTopElement, elementName));
}
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
index 206e1dd..b5ec2c3 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -68,7 +68,7 @@
@Override
public Object getKey() {
- return new Integer(objectId);
+ return Integer.valueOf(objectId);
}
@Override
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
index ee48939..8dac9a9 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2017 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -663,12 +663,12 @@
Map<Integer, RegistryObject> actualObjects = new HashMap<>(xpts.length + exts.length);
for (int i = 0; i < exts.length; i++) {
Extension tmp = (Extension) basicGetObject(exts[i], RegistryObjectManager.EXTENSION);
- actualObjects.put(new Integer(exts[i]), tmp);
+ actualObjects.put(Integer.valueOf(exts[i]), tmp);
collectChildren(tmp, 0, actualObjects);
}
for (int i = 0; i < xpts.length; i++) {
ExtensionPoint xpt = (ExtensionPoint) basicGetObject(xpts[i], RegistryObjectManager.EXTENSION_POINT);
- actualObjects.put(new Integer(xpts[i]), xpt);
+ actualObjects.put(Integer.valueOf(xpts[i]), xpt);
}
return actualObjects;
@@ -695,9 +695,9 @@
if (extPoint == null) // already removed?
continue;
- Integer extPointIndex = new Integer(extPoint.getKeyHashCode());
+ Integer extPointIndex = Integer.valueOf(extPoint.getKeyHashCode());
if (!associatedObjects.containsKey(extPointIndex))
- result.put(new Integer(extPoint.getKeyHashCode()), extPoint);
+ result.put(Integer.valueOf(extPoint.getKeyHashCode()), extPoint);
// add all extensions for the extension point
int[] extensions = extPoint.getRawChildren();
@@ -705,7 +705,7 @@
Extension tmp = (Extension) basicGetObject(extensions[j], RegistryObjectManager.EXTENSION);
if (tmp == null) // already removed
continue;
- Integer extensionIndex = new Integer(extensions[j]);
+ Integer extensionIndex = Integer.valueOf(extensions[j]);
if (!associatedObjects.containsKey(extensionIndex)) {
result.put(extensionIndex, tmp);
collectChildren(tmp, 0, result);
@@ -721,7 +721,7 @@
Extension tmp = (Extension) basicGetObject(extensions[j], RegistryObjectManager.EXTENSION);
if (tmp == null) // already removed
continue;
- Integer extensionIndex = new Integer(extensions[j]);
+ Integer extensionIndex = Integer.valueOf(extensions[j]);
if (!associatedObjects.containsKey(extensionIndex)) {
result.put(extensionIndex, tmp);
collectChildren(tmp, 0, result);
@@ -751,7 +751,7 @@
private void collectChildren(RegistryObject ce, int level, Map<Integer, RegistryObject> collector) {
ConfigurationElement[] children = (ConfigurationElement[]) getObjects(ce.getRawChildren(), level == 0 || ce.noExtraData() ? RegistryObjectManager.CONFIGURATION_ELEMENT : RegistryObjectManager.THIRDLEVEL_CONFIGURATION_ELEMENT);
for (int j = 0; j < children.length; j++) {
- collector.put(new Integer(children[j].getObjectId()), children[j]);
+ collector.put(Integer.valueOf(children[j].getObjectId()), children[j]);
collectChildren(children[j], level + 1, collector);
}
}
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
index e37e21f..1b6f546 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -124,7 +124,7 @@
if (!checkCacheValidity(tableInput, expectedTimestamp))
return null;
- Integer nextId = new Integer(tableInput.readInt());
+ Integer nextId = Integer.valueOf(tableInput.readInt());
OffsetTable offsets = OffsetTable.load(tableInput);
extensionPoints = new HashtableOfStringAndInt();
extensionPoints.load(tableInput);
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TemporaryObjectManager.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TemporaryObjectManager.java
index 5b121bf..a67c212 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TemporaryObjectManager.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TemporaryObjectManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,7 +21,7 @@
*/
public class TemporaryObjectManager implements IObjectManager {
private Map<?, ?> actualObjects; //id --> registry objects
- private RegistryObjectManager parent; //the main object manager (should be equals to extensionRegistry.getObjectManager)
+ private final RegistryObjectManager parent; //the main object manager (should be equals to extensionRegistry.getObjectManager)
public TemporaryObjectManager(Map<?, ?> actualObjects, RegistryObjectManager parent) {
this.actualObjects = actualObjects;
@@ -97,7 +97,7 @@
result = parent.getObject(id, type);
} catch (InvalidRegistryObjectException e) {
if (actualObjects != null) {
- result = actualObjects.get(new Integer(id));
+ result = actualObjects.get(Integer.valueOf(id));
}
}
if (result == null)
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java
index fc9cda8..36f4e79 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2014 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -190,7 +190,7 @@
// only need to worry about fragments
synchronized (currentStateStamp) {
// mark this host as processed for the current state stamp.
- dynamicAddStateStamps.put(Long.toString(bundle.getBundleId()), new Long(currentStateStamp[0]));
+ dynamicAddStateStamps.put(Long.toString(bundle.getBundleId()), Long.valueOf(currentStateStamp[0]));
}
return;
}
@@ -238,7 +238,7 @@
}
synchronized (currentStateStamp) {
// mark this host as processed for the current state stamp.
- dynamicAddStateStamps.put(hostID, new Long(currentStateStamp[0]));
+ dynamicAddStateStamps.put(hostID, Long.valueOf(currentStateStamp[0]));
}
}
}
diff --git a/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
index d42c90f..91bdd18 100644
--- a/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.security.ui;singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Import-Package: javax.crypto.spec,
diff --git a/bundles/org.eclipse.equinox.security.ui/pom.xml b/bundles/org.eclipse.equinox.security.ui/pom.xml
index 875db26..a3f6094 100644
--- a/bundles/org.eclipse.equinox.security.ui/pom.xml
+++ b/bundles/org.eclipse.equinox.security.ui/pom.xml
@@ -21,7 +21,7 @@
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.security.ui</artifactId>
- <version>1.2.100-SNAPSHOT</version>
+ <version>1.2.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/Activator.java b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/Activator.java
index 6898b08..a763712 100644
--- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/Activator.java
+++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2017 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -87,7 +87,7 @@
// Register the default authorization manager
Hashtable<String, Object> properties = new Hashtable<>(7);
- properties.put(Constants.SERVICE_RANKING, new Integer(Integer.MIN_VALUE));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MIN_VALUE));
properties.put(PROP_AUTHZ_MANAGER, PROP_DEFAULT_SERVICE);
defaultAuthzManagerReg = bundleContext.registerService(AuthorizationManager.class, new DefaultAuthorizationManager(), properties);
}
diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/X509CertificateAttributeContentProvider.java b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/X509CertificateAttributeContentProvider.java
index edb9236..2a55f73 100644
--- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/X509CertificateAttributeContentProvider.java
+++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/X509CertificateAttributeContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Jay Rosenthal and others.
+ * Copyright (c) 2008, 2018 Jay Rosenthal and others.
*
*
* This program and the accompanying materials
@@ -96,7 +96,7 @@
X509Certificate theCert = (X509Certificate) newInput;
- X509CertificateAttribute ver = new X509CertificateAttribute(SecurityUIMsg.CERTPROP_X509_VERSION, new Integer(theCert.getVersion()).toString());
+ X509CertificateAttribute ver = new X509CertificateAttribute(SecurityUIMsg.CERTPROP_X509_VERSION, Integer.valueOf(theCert.getVersion()).toString());
elements.add(ver);
X509CertificateAttribute serialNum = new X509CertificateAttribute(SecurityUIMsg.CERTPROP_X509_SERIAL_NUM, theCert.getSerialNumber().toString());
@@ -157,7 +157,7 @@
e1.printStackTrace();
}
int basicCnstrnts = theCert.getBasicConstraints();
- Integer basicConstraint = new Integer(basicCnstrnts);
+ Integer basicConstraint = Integer.valueOf(basicCnstrnts);
StringBuffer basicCnstrntsBfr = new StringBuffer();
if (basicCnstrnts == -1) {
// Not a CA
diff --git a/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
index 1549d79..b2c2562 100644
--- a/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %bundleName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.equinox.servletbridge;singleton:=true
-Bundle-Version: 1.4.100.qualifier
+Bundle-Version: 1.4.200.qualifier
Bundle-Localization: plugin
Import-Package: javax.servlet;version="2.3.0",
javax.servlet.http;version="2.3.0"
diff --git a/bundles/org.eclipse.equinox.servletbridge/pom.xml b/bundles/org.eclipse.equinox.servletbridge/pom.xml
index 2c4c34a..5771819 100644
--- a/bundles/org.eclipse.equinox.servletbridge/pom.xml
+++ b/bundles/org.eclipse.equinox.servletbridge/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.servletbridge</artifactId>
- <version>1.4.100-SNAPSHOT</version>
+ <version>1.4.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
index 20ca08e..01e6f58 100644
--- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
+++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
@@ -989,7 +989,7 @@
private Object[] getVersionElements(String version) {
if (version.endsWith(DOT_JAR))
version = version.substring(0, version.length() - 4);
- Object[] result = {new Integer(0), new Integer(0), new Integer(0), ""}; //$NON-NLS-1$
+ Object[] result = {Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0), ""}; //$NON-NLS-1$
StringTokenizer t = new StringTokenizer(version, "."); //$NON-NLS-1$
String token;
int i = 0;
@@ -998,7 +998,7 @@
if (i < 3) {
// major, minor or service ... numeric values
try {
- result[i++] = new Integer(token);
+ result[i++] = Integer.valueOf(token);
} catch (Exception e) {
// invalid number format - use default numbers (0) for the rest
break;
diff --git a/bundles/org.eclipse.equinox.util/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.util/META-INF/MANIFEST.MF
index aeb32d2..158a244 100644
--- a/bundles/org.eclipse.equinox.util/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.util/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.equinox.util
Bundle-Name: %bundleName
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.200.qualifier
Bundle-Vendor: %bundleVendor
Bundle-Activator: org.eclipse.equinox.internal.util.UtilActivator
Bundle-Description: The Equinox Util Bundle contains services to facilitate bundle developers in their programming, and to lighten resource usage at runtime.
diff --git a/bundles/org.eclipse.equinox.util/pom.xml b/bundles/org.eclipse.equinox.util/pom.xml
index 1f25c36..bf28e19 100644
--- a/bundles/org.eclipse.equinox.util/pom.xml
+++ b/bundles/org.eclipse.equinox.util/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.util</artifactId>
- <version>1.1.100-SNAPSHOT</version>
+ <version>1.1.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/SecurityUtil.java b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/SecurityUtil.java
index 863d298..8493636 100644
--- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/SecurityUtil.java
+++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/SecurityUtil.java
@@ -707,13 +707,13 @@
case FILE_GET_OUTPUT_STREAM :
return new FileOutputStream(((File) arg1).getAbsolutePath(), ((Boolean) arg2).booleanValue());
case FILE_LENGTH :
- return new Long(((File) arg1).length());
+ return Long.valueOf(((File) arg1).length());
case FILE_EXISTS :
return ((File) arg1).exists() ? Boolean.TRUE : Boolean.FALSE;
case FILE_ISDIR :
return ((File) arg1).isDirectory() ? Boolean.TRUE : Boolean.FALSE;
case FILE_LAST_MODIFIED :
- return new Long(((File) arg1).lastModified());
+ return Long.valueOf(((File) arg1).lastModified());
case FILE_LIST :
return ((File) arg1).list();
case FILE_DELETE :