aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core_test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-12 08:30:35 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-12 08:39:04 +0200
commit76a89b62274060452022ddf24a7685ee2f380cb4 (patch)
treeef924603de22efd026f519ab31fd8f5a6ff60f2f /jdisc_core_test
parent7e7ebf7b527be1f163d497a41898e2252d878fe7 (diff)
Replace all usages of Arrays.asList with List.of where possible.
Diffstat (limited to 'jdisc_core_test')
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryIntegrationTest.java3
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/ServerRepositoryIntegrationTest.java4
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/ApplicationLoaderIntegrationTest.java4
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java3
4 files changed, 6 insertions, 8 deletions
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryIntegrationTest.java
index f3d936b20d0..9c37fc7e0de 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryIntegrationTest.java
@@ -10,7 +10,6 @@ import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@@ -56,7 +55,7 @@ public class GuiceRepositoryIntegrationTest {
BundleInstaller installer = new BundleInstaller(driver.osgiFramework());
Bundle bundle = installer.installAndStart("my-guice-module.jar").get(0);
- builder.guiceModules().installAll(bundle, Arrays.asList("com.yahoo.jdisc.bundle.MyGuiceModule",
+ builder.guiceModules().installAll(bundle, List.of("com.yahoo.jdisc.bundle.MyGuiceModule",
"com.yahoo.jdisc.bundle.MyGuiceModule"));
List<Module> next = new LinkedList<>(builder.guiceModules().collection());
next.removeAll(prev);
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/ServerRepositoryIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/ServerRepositoryIntegrationTest.java
index 04b88654112..1232e0ecf0d 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/ServerRepositoryIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/ServerRepositoryIntegrationTest.java
@@ -8,8 +8,8 @@ import com.yahoo.jdisc.test.TestDriver;
import org.junit.Test;
import org.osgi.framework.Bundle;
-import java.util.Arrays;
import java.util.Iterator;
+import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -54,7 +54,7 @@ public class ServerRepositoryIntegrationTest {
BundleInstaller installer = new BundleInstaller(driver.osgiFramework());
Bundle bundle = installer.installAndStart("my-server-provider.jar").get(0);
ContainerBuilder builder = driver.newContainerBuilder();
- builder.serverProviders().installAll(bundle, Arrays.asList("com.yahoo.jdisc.bundle.MyServerProvider",
+ builder.serverProviders().installAll(bundle, List.of("com.yahoo.jdisc.bundle.MyServerProvider",
"com.yahoo.jdisc.bundle.MyServerProvider"));
Iterator<ServerProvider> it = builder.serverProviders().iterator();
assertTrue(it.hasNext());
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/ApplicationLoaderIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/ApplicationLoaderIntegrationTest.java
index a0fde346901..cf8914ea39a 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/ApplicationLoaderIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/ApplicationLoaderIntegrationTest.java
@@ -8,8 +8,8 @@ import org.apache.felix.framework.util.FelixConstants;
import org.junit.Test;
import org.osgi.framework.Bundle;
-import java.util.Arrays;
import java.util.Iterator;
+import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -29,7 +29,7 @@ public class ApplicationLoaderIntegrationTest {
public void requireThatLifecycleWorks() throws Exception {
MyModule module = new MyModule();
ApplicationLoader loader = new ApplicationLoader(TestDriver.newOsgiFramework(),
- Arrays.asList(module));
+ List.of(module));
loader.init("app-a.jar", false);
assertFalse(module.init.await(100, TimeUnit.MILLISECONDS));
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
index f91407326c5..53a2b20a0b1 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
@@ -8,7 +8,6 @@ import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
-import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -214,7 +213,7 @@ public class FelixFrameworkIntegrationTest {
for (Bundle bundle : bundles) {
actual.add(bundle.getSymbolicName());
}
- assertEquals(Arrays.asList(expectedBundles), actual);
+ assertEquals(List.of(expectedBundles), actual);
felix.startBundles(bundles, false);
if (className != null) {
assertNotNull(bundles.get(0).loadClass(className).getDeclaredConstructor().newInstance());