Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2020-08-11 13:44:08 +0000
committerThomas Watson2020-08-11 13:44:08 +0000
commitae9290b9b17561c858e394357750653804b89b06 (patch)
tree1e38d83288aac9a49259432ae14bdbf966c469a0
parenta40b95af356f4bea7583062dbff623ccfaf8ef50 (diff)
downloadrt.equinox.framework-Y20200815-1200.tar.gz
rt.equinox.framework-Y20200815-1200.tar.xz
rt.equinox.framework-Y20200815-1200.zip
constructors Change-Id: I91933a37b055da0b4993a2c52aeedc5054e86541 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java6
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java6
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java9
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java12
6 files changed, 23 insertions, 18 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
index a92888b7c..5fcfddf48 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2018 IBM Corporation and others.
+ * Copyright (c) 2004, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -71,7 +71,7 @@ public class ResolverBundle extends VersionSupplier implements Comparable<Resolv
ResolverBundle(BundleDescription bundle, ResolverImpl resolver) {
super(bundle);
- this.bundleID = new Long(bundle.getBundleId());
+ this.bundleID = Long.valueOf(bundle.getBundleId());
this.resolver = resolver;
initialize(bundle.isResolved());
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 6bb5d8774..25af89e8e 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2018 IBM Corporation and others.
+ * Copyright (c) 2004, 2020 IBM Corporation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which accompanies this distribution,
@@ -2153,7 +2153,7 @@ public class ResolverImpl implements Resolver {
private void internalBundleRemoved(BundleDescription bundle, boolean pending) {
// check if there are any dependants
if (pending)
- removalPending.put(new Long(bundle.getBundleId()), bundle);
+ removalPending.put(Long.valueOf(bundle.getBundleId()), bundle);
if (!initialized)
return;
ResolverBundle rb = bundleMapping.get(bundle);
@@ -2174,7 +2174,7 @@ public class ResolverImpl implements Resolver {
private void unresolveBundle(ResolverBundle bundle, boolean removed) {
// check the removed list if unresolving then remove from the removed list
- List<BundleDescription> removedBundles = removalPending.remove(new Long(bundle.getBundleDescription().getBundleId()));
+ List<BundleDescription> removedBundles = removalPending.remove(Long.valueOf(bundle.getBundleDescription().getBundleId()));
for (BundleDescription removedDesc : removedBundles) {
ResolverBundle re = bundleMapping.get(removedDesc);
if (re == null) {
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
index 3665e17e0..0c6d04e04 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -530,7 +530,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
}
public Object getKey() {
- return new Long(bundleId);
+ return Long.valueOf(bundleId);
}
public boolean compare(KeyedElement other) {
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
index 65e441261..1735efa76 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2018 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -457,9 +457,9 @@ public class StateBuilder {
String trimmed = value.trim();
if (ATTR_TYPE_DOUBLE.equalsIgnoreCase(type))
- return new Double(trimmed);
+ return Double.valueOf(trimmed);
else if (ATTR_TYPE_LONG.equalsIgnoreCase(type))
- return new Long(trimmed);
+ return Long.valueOf(trimmed);
else if (ATTR_TYPE_URI.equalsIgnoreCase(type))
try {
Class<?> uriClazz = Class.forName("java.net.URI"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
index 5973a2ce0..f02fde818 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2018 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -94,6 +94,7 @@ public abstract class StateImpl implements State {
* <tt>Dictionary</tt> object returned by the <tt>Bundle.getHeaders</tt> method.
* @deprecated
*/
+ @Deprecated
public final static String PROVIDE_PACKAGE = "Provide-Package"; //$NON-NLS-1$
/**
@@ -113,6 +114,7 @@ public abstract class StateImpl implements State {
* syntax version 2 will not recognize this attribute.
* @deprecated
*/
+ @Deprecated
public final static String REPROVIDE_ATTRIBUTE = "reprovide"; //$NON-NLS-1$
/**
@@ -134,6 +136,7 @@ public abstract class StateImpl implements State {
* @since 1.3 <b>EXPERIMENTAL</b>
* @deprecated
*/
+ @Deprecated
public final static String OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
public static final String OSGI_RESOLVER_MODE = "osgi.resolverMode"; //$NON-NLS-1$
@@ -420,6 +423,7 @@ public abstract class StateImpl implements State {
/**
* @deprecated
*/
+ @Deprecated
public void resolveBundle(BundleDescription bundle, boolean status, BundleDescription[] hosts, ExportPackageDescription[] selectedExports, BundleDescription[] resolvedRequires, ExportPackageDescription[] resolvedImports) {
resolveBundle(bundle, status, hosts, selectedExports, null, resolvedRequires, resolvedImports);
}
@@ -427,6 +431,7 @@ public abstract class StateImpl implements State {
/**
* @deprecated
*/
+ @Deprecated
public void resolveBundle(BundleDescription bundle, boolean status, BundleDescription[] hosts, ExportPackageDescription[] selectedExports, ExportPackageDescription[] substitutedExports, BundleDescription[] resolvedRequires, ExportPackageDescription[] resolvedImports) {
resolveBundle(bundle, status, hosts, selectedExports, substitutedExports, null, resolvedRequires, resolvedImports, null, null);
}
@@ -1148,7 +1153,7 @@ public abstract class StateImpl implements State {
// ask the resolver to resolve our dynamic import
ExportPackageDescriptionImpl result = (ExportPackageDescriptionImpl) resolver.resolveDynamicImport(importingBundle, requestedPackage);
if (result == null)
- importer.setDynamicStamp(requestedPackage, new Long(getTimeStamp()));
+ importer.setDynamicStamp(requestedPackage, Long.valueOf(getTimeStamp()));
else {
importer.setDynamicStamp(requestedPackage, null); // remove any cached timestamp
// need to add the result to the list of resolved imports
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
index ddb8d4128..06422cd85 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2019 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -363,7 +363,7 @@ final class StateReader {
HashMap<String, Long> dynamicStamps = new HashMap<>(dynamicPkgCnt);
for (int i = 0; i < dynamicPkgCnt; i++) {
String pkg = readString(in, false);
- Long stamp = new Long(in.readLong());
+ Long stamp = Long.valueOf(in.readLong());
dynamicStamps.put(pkg, stamp);
}
result.setDynamicStamps(dynamicStamps);
@@ -471,9 +471,9 @@ final class StateReader {
else if (type == 3)
value = Integer.valueOf(in.readInt());
else if (type == 4)
- value = new Long(in.readLong());
+ value = Long.valueOf(in.readLong());
else if (type == 5)
- value = new Double(in.readDouble());
+ value = Double.valueOf(in.readDouble());
else if (type == 6)
value = readVersion(in);
else if (type == 7) {
@@ -502,10 +502,10 @@ final class StateReader {
list.add(Integer.valueOf(in.readInt()));
break;
case 4 :
- list.add(new Long(in.readLong()));
+ list.add(Long.valueOf(in.readLong()));
break;
case 5 :
- list.add(new Double(in.readDouble()));
+ list.add(Double.valueOf(in.readDouble()));
break;
case 6 :
list.add(readVersion(in));

Back to the top