From c0a2a4c5b8c595b3f523026a9684d505cabedf05 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Fri, 2 Dec 2022 22:44:23 +0100 Subject: Revert "Revert "Let list handling catch up with Java 17"" --- .../container/impl/ClassLoaderOsgiFramework.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'standalone-container/src') 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 bundleLocations = new ArrayList<>(); - private List bundleList = Lists.newArrayList(systemBundleImpl); + private final List bundleLocations = new ArrayList<>(); + private final List 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 installBundle(String bundleLocation) { -- cgit v1.2.3