Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2018-11-07 17:29:42 -0500
committerThomas Watson2018-11-07 17:29:42 -0500
commit419454b0a952559d62117e102dfdceb8a7416d78 (patch)
tree1da0a06652c11266af793416bb6257b42e4548dc
parentad8f346fcbba3aeca429591e1a370e7dfc079616 (diff)
downloadrt.equinox.framework-419454b0a952559d62117e102dfdceb8a7416d78.tar.gz
rt.equinox.framework-419454b0a952559d62117e102dfdceb8a7416d78.tar.xz
rt.equinox.framework-419454b0a952559d62117e102dfdceb8a7416d78.zip
Use Collections.singletonList instead of Arrays.asList when possibleY20181107-2200
Change-Id: I91c963e0d21c2f1aa23db5ac65882a87cb9603b5 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java10
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java2
4 files changed, 14 insertions, 8 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java
index 166f229b4..480e24155 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java
@@ -13,7 +13,9 @@
*******************************************************************************/
package org.eclipse.osgi.container;
-import java.util.*;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
@@ -23,7 +25,9 @@ import org.eclipse.osgi.internal.debug.Debug;
import org.eclipse.osgi.internal.messages.Msg;
import org.eclipse.osgi.report.resolution.ResolutionReport;
import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
+import org.osgi.framework.AdminPermission;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.BundleReference;
import org.osgi.framework.startlevel.BundleStartLevel;
import org.osgi.framework.wiring.BundleRevision;
import org.osgi.service.resolver.ResolutionException;
@@ -427,7 +431,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa
unlockStateChange(ModuleEvent.STARTED);
lockedStarted = false;
try {
- report = getRevisions().getContainer().resolve(Arrays.asList(this), true);
+ report = getRevisions().getContainer().resolve(Collections.singletonList(this), true);
} finally {
lockStateChange(ModuleEvent.STARTED);
lockedStarted = true;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java
index 844d1d205..e7e8426e0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java
@@ -13,7 +13,7 @@
*******************************************************************************/
package org.eclipse.osgi.container;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.EnumSet;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
@@ -22,7 +22,9 @@ import org.eclipse.osgi.container.ModuleContainerAdaptor.ContainerEvent;
import org.eclipse.osgi.container.ModuleContainerAdaptor.ModuleEvent;
import org.eclipse.osgi.internal.messages.Msg;
import org.eclipse.osgi.report.resolution.ResolutionReport;
-import org.osgi.framework.*;
+import org.osgi.framework.AdminPermission;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
import org.osgi.framework.launch.Framework;
import org.osgi.service.resolver.ResolutionException;
@@ -65,7 +67,7 @@ public abstract class SystemModule extends Module {
lockedStarted = false;
ResolutionReport report;
try {
- report = getRevisions().getContainer().resolve(Arrays.asList((Module) this), true);
+ report = getRevisions().getContainer().resolve(Collections.singletonList((Module) this), true);
} finally {
lockStateChange(ModuleEvent.STARTED);
lockedStarted = true;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
index 8205ceb19..74438c56a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
@@ -1028,7 +1028,7 @@ public class EquinoxBundle implements Bundle, BundleReference {
ResolutionReport resolve() {
if (!Module.RESOLVED_SET.contains(module.getState())) {
- return module.getContainer().resolve(Arrays.asList(module), true);
+ return module.getContainer().resolve(Collections.singletonList(module), true);
}
return null;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index 5d5a8889e..6dfe504b7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -383,7 +383,7 @@ public class Storage {
ModuleRevisionBuilder builder = getBuilder(newGeneration);
systemModule = moduleContainer.install(null, Constants.SYSTEM_BUNDLE_LOCATION, builder, newGeneration);
- moduleContainer.resolve(Arrays.asList(systemModule), false);
+ moduleContainer.resolve(Collections.singletonList(systemModule), false);
} else {
ModuleRevision currentRevision = systemModule.getCurrentRevision();
Generation currentGeneration = currentRevision == null ? null : (Generation) currentRevision.getRevisionInfo();

Back to the top