diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-12 08:30:35 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-12 08:39:04 +0200 |
commit | 76a89b62274060452022ddf24a7685ee2f380cb4 (patch) | |
tree | ef924603de22efd026f519ab31fd8f5a6ff60f2f /jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java | |
parent | 7e7ebf7b527be1f163d497a41898e2252d878fe7 (diff) |
Replace all usages of Arrays.asList with List.of where possible.
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java')
-rw-r--r-- | jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java index 7aa8a16d856..30c917f9150 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/application/GuiceRepositoryTestCase.java @@ -12,7 +12,6 @@ import com.google.inject.name.Named; import com.google.inject.name.Names; import org.junit.jupiter.api.Test; -import java.util.Arrays; import java.util.Iterator; import java.util.List; @@ -47,7 +46,7 @@ public class GuiceRepositoryTestCase { GuiceRepository guice = new GuiceRepository(); StringBinding foo = new StringBinding("fooKey", "fooVal"); StringBinding bar = new StringBinding("barKey", "barVal"); - guice.installAll(Arrays.asList(foo, bar)); + guice.installAll(List.of(foo, bar)); assertBinding(guice, "fooKey", "fooVal"); assertBinding(guice, "barKey", "barVal"); @@ -77,12 +76,12 @@ public class GuiceRepositoryTestCase { StringBinding foo = new StringBinding("fooKey", "fooVal"); StringBinding bar = new StringBinding("barKey", "barVal"); StringBinding baz = new StringBinding("bazKey", "bazVal"); - guice.installAll(Arrays.asList(foo, bar, baz)); + guice.installAll(List.of(foo, bar, baz)); assertBinding(guice, "fooKey", "fooVal"); assertBinding(guice, "barKey", "barVal"); assertBinding(guice, "bazKey", "bazVal"); - guice.uninstallAll(Arrays.asList(foo, baz)); + guice.uninstallAll(List.of(foo, baz)); assertNoBinding(guice, "fooKey"); assertBinding(guice, "barKey", "barVal"); assertNoBinding(guice, "bazKey"); @@ -122,7 +121,7 @@ public class GuiceRepositoryTestCase { void requireThatPrivateModulesWorks() { GuiceRepository guice = new GuiceRepository(); - List<Named> names = Arrays.asList(Names.named("A"), Names.named("B")); + List<Named> names = List.of(Names.named("A"), Names.named("B")); for (Named name : names) { guice.install(createPrivateInjectNameModule(name)); |