Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-08 06:46:57 +0000
committerAlexander Kurtakov2019-10-08 07:18:40 +0000
commitdb241093d4c91d2c99f881b6067f690623d28eb0 (patch)
tree16931dbc8a181071bb32a8185ca2bfc6f0908287
parent0ffa055b493dcb31a07fca1bbea9f4651320b762 (diff)
downloadrt.equinox.bundles-db241093d4c91d2c99f881b6067f690623d28eb0.tar.gz
rt.equinox.bundles-db241093d4c91d2c99f881b6067f690623d28eb0.tar.xz
rt.equinox.bundles-db241093d4c91d2c99f881b6067f690623d28eb0.zip
Move away of deprecated Number constructors.I20191008-0600
Change-Id: Iced50804217815d57c0c97c3b80479c622158232 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java2
-rw-r--r--bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java4
-rw-r--r--bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java4
-rw-r--r--bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationDictionaryTest.java56
-rw-r--r--bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationPluginTest.java8
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_26to27.java2
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_39to41.java2
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest.java4
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/MockServlet.java2
9 files changed, 42 insertions, 42 deletions
diff --git a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java
index b93b36a78..21cfc2b8c 100644
--- a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java
+++ b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java
@@ -36,7 +36,7 @@ import org.eclipse.equinox.bidi.internal.StructuredTextActivator;
public class StructuredTextJava extends StructuredTextTypeHandler {
private static final byte WS = Character.DIRECTIONALITY_WHITESPACE;
static final String lineSep = StructuredTextActivator.getProperty("line.separator"); //$NON-NLS-1$
- private static final Integer STATE_SLASH_ASTER_COMMENT = new Integer(3);
+ private static final Integer STATE_SLASH_ASTER_COMMENT = Integer.valueOf(3);
public StructuredTextJava() {
super("[](){}.+-<>=~!&*/%^|?:,;\t"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java
index e8df751c1..b3404da85 100644
--- a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java
+++ b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java
@@ -63,8 +63,8 @@ public class StructuredTextRegex extends StructuredTextTypeHandler {
static final byte AL = Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC;
static final byte AN = Character.DIRECTIONALITY_ARABIC_NUMBER;
static final byte EN = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
- private static final Integer STATE_COMMENT = new Integer(1);
- private static final Integer STATE_QUOTED_SEQUENCE = new Integer(17);
+ private static final Integer STATE_COMMENT = Integer.valueOf(1);
+ private static final Integer STATE_QUOTED_SEQUENCE = Integer.valueOf(17);
/**
* Retrieves the number of special cases handled by this handler.
diff --git a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java
index 938cccd47..611cb8411 100644
--- a/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java
+++ b/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java
@@ -36,8 +36,8 @@ import org.eclipse.equinox.bidi.internal.StructuredTextActivator;
public class StructuredTextSql extends StructuredTextTypeHandler {
private static final byte WS = Character.DIRECTIONALITY_WHITESPACE;
static final String lineSep = StructuredTextActivator.getProperty("line.separator"); //$NON-NLS-1$
- private static final Integer STATE_LITERAL = new Integer(2);
- private static final Integer STATE_SLASH_ASTER_COMMENT = new Integer(4);
+ private static final Integer STATE_LITERAL = Integer.valueOf(2);
+ private static final Integer STATE_SLASH_ASTER_COMMENT = Integer.valueOf(4);
public StructuredTextSql() {
super("\t!#%&()*+,-./:;<=>?|[]{}"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationDictionaryTest.java b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationDictionaryTest.java
index e9da99c87..46bfaf4dc 100644
--- a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationDictionaryTest.java
+++ b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationDictionaryTest.java
@@ -49,22 +49,22 @@ public class ConfigurationDictionaryTest {
Dictionary<String, Object> dict = config.getProperties();
try {
dict.put("1", new String("x"));
- dict.put("2", new Integer(1));
- dict.put("3", new Long(1));
- dict.put("4", new Float(1));
- dict.put("5", new Double(1));
- dict.put("6", new Byte((byte) 1));
- dict.put("7", new Short((short) 1));
- dict.put("8", new Character('a'));
+ dict.put("2", Integer.valueOf(1));
+ dict.put("3", Long.valueOf(1));
+ dict.put("4", Float.valueOf(1));
+ dict.put("5", Double.valueOf(1));
+ dict.put("6", Byte.valueOf((byte) 1));
+ dict.put("7", Short.valueOf((short) 1));
+ dict.put("8", Character.valueOf('a'));
dict.put("9", Boolean.TRUE);
dict.put("10", new String[] {"x"});
- dict.put("11", new Integer[] {new Integer(1)});
- dict.put("12", new Long[] {new Long(1)});
- dict.put("13", new Float[] {new Float(1)});
- dict.put("14", new Double[] {new Double(1)});
- dict.put("15", new Byte[] {new Byte((byte) 1)});
- dict.put("16", new Short[] {new Short((short) 1)});
- dict.put("17", new Character[] {new Character('a')});
+ dict.put("11", new Integer[] {Integer.valueOf(1)});
+ dict.put("12", new Long[] {Long.valueOf(1)});
+ dict.put("13", new Float[] {Float.valueOf(1)});
+ dict.put("14", new Double[] {Double.valueOf(1)});
+ dict.put("15", new Byte[] {Byte.valueOf((byte) 1)});
+ dict.put("16", new Short[] {Short.valueOf((short) 1)});
+ dict.put("17", new Character[] {Character.valueOf('a')});
dict.put("18", new Boolean[] {Boolean.TRUE});
dict.put("19", new int[] {1});
dict.put("20", new long[] {1});
@@ -77,24 +77,24 @@ public class ConfigurationDictionaryTest {
dict.put("27", new Vector<Object>());
Vector<Object> v = new Vector<Object>();
v.add(new String("x"));
- v.add(new Integer(1));
- v.add(new Long(1));
- v.add(new Float(1));
- v.add(new Double(1));
- v.add(new Byte((byte) 1));
- v.add(new Short((short) 1));
- v.add(new Character('a'));
+ v.add(Integer.valueOf(1));
+ v.add(Long.valueOf(1));
+ v.add(Float.valueOf(1));
+ v.add(Double.valueOf(1));
+ v.add(Byte.valueOf((byte) 1));
+ v.add(Short.valueOf((short) 1));
+ v.add(Character.valueOf('a'));
v.add(Boolean.TRUE);
dict.put("28", v);
Collection<Object> c = new ArrayList<Object>();
c.add(new String("x"));
- c.add(new Integer(1));
- c.add(new Long(1));
- c.add(new Float(1));
- c.add(new Double(1));
- c.add(new Byte((byte) 1));
- c.add(new Short((short) 1));
- c.add(new Character('a'));
+ c.add(Integer.valueOf(1));
+ c.add(Long.valueOf(1));
+ c.add(Float.valueOf(1));
+ c.add(Double.valueOf(1));
+ c.add(Byte.valueOf((byte) 1));
+ c.add(Short.valueOf((short) 1));
+ c.add(Character.valueOf('a'));
c.add(Boolean.TRUE);
dict.put("29", c);
} catch (IllegalArgumentException e) {
diff --git a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationPluginTest.java b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationPluginTest.java
index 802bb32e5..f56020ea2 100644
--- a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationPluginTest.java
+++ b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ConfigurationPluginTest.java
@@ -190,7 +190,7 @@ public class ConfigurationPluginTest {
}
};
Dictionary<String, Object> pluginDict = new Hashtable<String, Object>();
- pluginDict.put(ConfigurationPlugin.CM_RANKING, new Integer(1));
+ pluginDict.put(ConfigurationPlugin.CM_RANKING, Integer.valueOf(1));
ServiceRegistration<ConfigurationPlugin> pluginReg1 = Activator.getBundleContext().registerService(ConfigurationPlugin.class, plugin, pluginDict);
ConfigurationPlugin plugin2 = new ConfigurationPlugin() {
@@ -241,7 +241,7 @@ public class ConfigurationPluginTest {
final List<String> pluginsCalled = new ArrayList<String>();
Hashtable<String, Object> pluginProps = new Hashtable<String, Object>();
- pluginProps.put(Constants.SERVICE_RANKING, new Integer(1));
+ pluginProps.put(Constants.SERVICE_RANKING, Integer.valueOf(1));
ConfigurationPlugin plugin1 = new ConfigurationPlugin() {
public void modifyConfiguration(ServiceReference<?> serviceReference, Dictionary<String, Object> properties) {
pluginsCalled.add("plugin1");
@@ -255,7 +255,7 @@ public class ConfigurationPluginTest {
}
};
- pluginProps.put(Constants.SERVICE_RANKING, new Integer(2));
+ pluginProps.put(Constants.SERVICE_RANKING, Integer.valueOf(2));
ServiceRegistration<ConfigurationPlugin> pluginReg2 = Activator.getBundleContext().registerService(ConfigurationPlugin.class, plugin2, pluginProps);
ConfigurationPlugin plugin3 = new ConfigurationPlugin() {
@@ -264,7 +264,7 @@ public class ConfigurationPluginTest {
}
};
- pluginProps.put(Constants.SERVICE_RANKING, new Integer(1));
+ pluginProps.put(Constants.SERVICE_RANKING, Integer.valueOf(1));
ServiceRegistration<ConfigurationPlugin> pluginReg3 = Activator.getBundleContext().registerService(ConfigurationPlugin.class, plugin3, pluginProps);
ManagedService ms = new ManagedService() {
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_26to27.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_26to27.java
index 6acfd87f4..a57e7509c 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_26to27.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_26to27.java
@@ -48,7 +48,7 @@ public class Test_140_2_26to27 extends BaseTest {
properties = new Hashtable<String, Object>();
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "foobar");
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/foo");
- properties.put(Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
registrations.add(context.registerService(ServletContextHelper.class, new ServletContextHelper() {}, properties));
properties = new Hashtable<String, Object>();
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_39to41.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_39to41.java
index fd33c4624..4fe6f6be7 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_39to41.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_2_39to41.java
@@ -43,7 +43,7 @@ public class Test_140_2_39to41 extends BaseTest {
properties = new Hashtable<String, Object>();
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "foo");
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/foo/bar");
- properties.put(Constants.SERVICE_RANKING, new Integer(1000));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(1000));
registrations.add(context.registerService(ServletContextHelper.class, new ServletContextHelper() {}, properties));
FailedServletContextDTO failedServletContextDTO = getFailedServletContextDTOByName("foo");
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest.java
index 6ceff6fe9..1e3a637a0 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest.java
@@ -41,13 +41,13 @@ public class Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_tieGoesToOldest exten
Dictionary<String, Object> properties = new Hashtable<String, Object>();
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, DEFAULT);
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, contextPath);
- properties.put(Constants.SERVICE_RANKING, new Integer(1000));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(1000));
registrations.add(context.registerService(ServletContextHelper.class, new ServletContextHelper() {}, properties));
properties = new Hashtable<String, Object>();
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, DEFAULT);
properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/otherContext");
- properties.put(Constants.SERVICE_RANKING, new Integer(1000));
+ properties.put(Constants.SERVICE_RANKING, Integer.valueOf(1000));
registrations.add(context.registerService(ServletContextHelper.class, new ServletContextHelper() {}, properties));
AtomicReference<ServletContext> sc1 = new AtomicReference<ServletContext>();
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/MockServlet.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/MockServlet.java
index ea1348e43..86a4c02bb 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/MockServlet.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/MockServlet.java
@@ -47,7 +47,7 @@ public class MockServlet extends HttpServlet {
}
public MockServlet error(int code, String errorMessage) {
- this.code = new Integer(code);
+ this.code = Integer.valueOf(code);
this.errorMessage = errorMessage;
return this;

Back to the top