diff options
author | Alexander Kurtakov | 2018-10-08 15:34:35 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-10-08 17:51:56 +0000 |
commit | cb336c56c1eeecbe817ab3289c8550e520c83192 (patch) | |
tree | b722c5a9137b6d39d83eb9b40a0f436e87d75a29 /bundles | |
parent | 09a2749c1aac152df0f333e4c5d2f341355ce710 (diff) | |
download | rt.equinox.bundles-cb336c56c1eeecbe817ab3289c8550e520c83192.tar.gz rt.equinox.bundles-cb336c56c1eeecbe817ab3289c8550e520c83192.tar.xz rt.equinox.bundles-cb336c56c1eeecbe817ab3289c8550e520c83192.zip |
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>
Diffstat (limited to 'bundles')
32 files changed, 83 insertions, 83 deletions
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 f10ae0d13..59c8a93dd 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 @@ public interface IApplication { /** * 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 @@ public interface IApplication { * 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 121431fa3..288c54e22 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 @@ public class AppPersistence implements ServiceTrackerCustomizer { } 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 @@ public class AppPersistence implements ServiceTrackerCustomizer { 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 2f324123f..c2bd893ec 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 @@ Manifest-Version: 1.0 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 18418f750..901da57e5 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 2aec2430d..fc7479ff4 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 @@ public class EquinoxCommandProvider implements SynchronousBundleListener { 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 a4ba305f2..d13f2272b 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 class HelpCommand { 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 1b547135e..dcf266a4a 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 @@ public class CallRegistrator implements ComponentContextProvider { } 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 41a11e07c..b6c20f443 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 @@ public class BindUnbindRegistrator implements PropertiesProvider { } 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 7f7b9b872..811da5630 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 @@ public class Component1 implements PropertiesProvider, ComponentContextProvider 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 6f77ae1e5..cf79c8b93 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 @@ public class ModifyRegistrator implements ComponentContextProvider { } 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 b89fa67e5..f8b13ce66 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 @@ public class ModifyRegistrator implements ComponentContextProvider { } 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 c928a34e1..3887a34a5 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 @@ public class BindRegistrator implements ComponentContextProvider { } 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 9c9f6659b..c423ba64c 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 @@ public class ServletTest extends BaseTest { 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 2c737114e..bc537b3e4 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 @@ public class TestServletPrototype extends HttpServlet { // 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 f840a1286..98ccce132 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 class CombinedEventDelta { 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 7363b7ad0..fa58c9658 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 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR 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 3d1a890f4..8a8407642 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 @@ public class ExtensionsParser extends DefaultHandler { 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 @@ public class ExtensionsParser extends DefaultHandler { // 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 @@ public class ExtensionsParser extends DefaultHandler { // 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 @@ public class ExtensionsParser extends DefaultHandler { 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 @@ public class ExtensionsParser extends DefaultHandler { 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 @@ public class ExtensionsParser extends DefaultHandler { 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 @@ public class ExtensionsParser extends DefaultHandler { */ @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 @@ public class ExtensionsParser extends DefaultHandler { 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 206e1dd9e..b5ec2c3ab 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 @@ public abstract class RegistryObject implements KeyedElement { @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 ee48939aa..8dac9a967 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 @@ public class RegistryObjectManager implements IObjectManager { 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 @@ public class RegistryObjectManager implements IObjectManager { 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 @@ public class RegistryObjectManager implements IObjectManager { 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 @@ public class RegistryObjectManager implements IObjectManager { 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 @@ public class RegistryObjectManager implements IObjectManager { 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 e37e21fef..1b6f54674 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 @@ public class TableReader { 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 5b121bf59..a67c2124a 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 @@ import org.eclipse.core.runtime.InvalidRegistryObjectException; */ 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 @@ public class TemporaryObjectManager implements IObjectManager { 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 fc9cda899..36f4e7942 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 @@ public class EclipseBundleListener implements SynchronousBundleListener { // 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 @@ public class EclipseBundleListener implements SynchronousBundleListener { } 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 d42c90fe1..91bdd1855 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 @@ Manifest-Version: 1.0 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 875db26bd..a3f6094a8 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 6898b0849..a763712f3 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 @@ public class Activator extends AbstractUIPlugin { // 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 edb92364e..2a55f735e 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 @@ public class X509CertificateAttributeContentProvider implements IStructuredConte 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 @@ public class X509CertificateAttributeContentProvider implements IStructuredConte 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 1549d798a..b2c256203 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-ManifestVersion: 2 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 2c4c34a33..577181920 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 20ca08ee7..01e6f58f1 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 @@ public class FrameworkLauncher { 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 @@ public class FrameworkLauncher { 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 aeb32d2a5..158a244ee 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 @@ Manifest-Version: 1.0 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 1f25c361e..bf28e19b7 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 863d298c5..84936360b 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 @@ public final class SecurityUtil implements PrivilegedRunner.PrivilegedDispatcher 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 : |