diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-02 22:44:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 22:44:23 +0100 |
commit | c0a2a4c5b8c595b3f523026a9684d505cabedf05 (patch) | |
tree | 94fedd0f85998659dd956b5256e60ca8e4950817 /standalone-container | |
parent | 7f870bf3cb8dd0a3d015a448608ba7291a783932 (diff) |
Revert "Revert "Let list handling catch up with Java 17""
Diffstat (limited to 'standalone-container')
-rw-r--r-- | standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java b/standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java index 1526bc3dc5d..48f1efc7615 100644 --- a/standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java +++ b/standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.application.container.impl; -import com.google.common.collect.Lists; import com.yahoo.container.standalone.StandaloneContainerApplication; import com.yahoo.jdisc.application.OsgiFramework; import com.yahoo.jdisc.application.OsgiHeader; @@ -51,15 +50,15 @@ import java.util.jar.JarFile; */ public final class ClassLoaderOsgiFramework implements OsgiFramework { - private BundleContextImpl bundleContextImpl = new BundleContextImpl(); - private SystemBundleImpl systemBundleImpl = new SystemBundleImpl(); - private BundleWiringImpl bundleWiringImpl = new BundleWiringImpl(); + private final BundleContextImpl bundleContextImpl = new BundleContextImpl(); + private final SystemBundleImpl systemBundleImpl = new SystemBundleImpl(); + private final BundleWiringImpl bundleWiringImpl = new BundleWiringImpl(); - private List<URL> bundleLocations = new ArrayList<>(); - private List<Bundle> bundleList = Lists.newArrayList(systemBundleImpl); + private final List<URL> bundleLocations = new ArrayList<>(); + private final List<Bundle> bundleList = new ArrayList<>(List.of(systemBundleImpl)); private ClassLoader classLoader = null; - private AtomicInteger nextBundleId = new AtomicInteger(1); + private final AtomicInteger nextBundleId = new AtomicInteger(1); @Override public List<Bundle> installBundle(String bundleLocation) { |