From 81b884ac555806ae2f0a75773accfd8fe27ecbe1 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Fri, 2 Dec 2022 14:52:26 +0100 Subject: Revert "Let list handling catch up with Java 17" --- .../container/impl/ClassLoaderOsgiFramework.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 48f1efc7615..1526bc3dc5d 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,6 +1,7 @@ // 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; @@ -50,15 +51,15 @@ import java.util.jar.JarFile; */ public final class ClassLoaderOsgiFramework implements OsgiFramework { - private final BundleContextImpl bundleContextImpl = new BundleContextImpl(); - private final SystemBundleImpl systemBundleImpl = new SystemBundleImpl(); - private final BundleWiringImpl bundleWiringImpl = new BundleWiringImpl(); + private BundleContextImpl bundleContextImpl = new BundleContextImpl(); + private SystemBundleImpl systemBundleImpl = new SystemBundleImpl(); + private BundleWiringImpl bundleWiringImpl = new BundleWiringImpl(); - private final List bundleLocations = new ArrayList<>(); - private final List bundleList = new ArrayList<>(List.of(systemBundleImpl)); + private List bundleLocations = new ArrayList<>(); + private List bundleList = Lists.newArrayList(systemBundleImpl); private ClassLoader classLoader = null; - private final AtomicInteger nextBundleId = new AtomicInteger(1); + private AtomicInteger nextBundleId = new AtomicInteger(1); @Override public List installBundle(String bundleLocation) { -- cgit v1.2.3