diff --git a/core/src/main/java/lucee/runtime/osgi/BundleInfo.java b/core/src/main/java/lucee/runtime/osgi/BundleInfo.java index 8e17652bbd..0e78a10d3e 100644 --- a/core/src/main/java/lucee/runtime/osgi/BundleInfo.java +++ b/core/src/main/java/lucee/runtime/osgi/BundleInfo.java @@ -70,7 +70,6 @@ public class BundleInfo implements Serializable { private Map headers; private Map exportPackageAsMap; - private List exportPackageAsList; private static Map bundles = new HashMap(); public static BundleInfo getInstance(String id, InputStream is, boolean closeStream) throws IOException, BundleException { @@ -163,12 +162,10 @@ public Collection getExportPackageAsCollection() { synchronized (this) { if (exportPackageAsMap == null) { if (StringUtil.isEmpty(exportPackage, true)) { - exportPackageAsList = new ArrayList<>(); return (exportPackageAsMap = new HashMap<>()).values(); } exportPackageAsMap = new HashMap<>(); - exportPackageAsList = new ArrayList<>(); int len = exportPackage.length(); char c; boolean inline = false; @@ -182,7 +179,6 @@ public Collection getExportPackageAsCollection() { } else if (!inline && c == ',') { pd = toPackageDefinition(sb.toString()); - exportPackageAsList.add(pd); exportPackageAsMap.put(pd.getName(), pd); sb = new StringBuilder(); @@ -190,12 +186,11 @@ else if (!inline && c == ',') { else sb.append(c); } pd = toPackageDefinition(sb.toString()); - exportPackageAsList.add(pd); exportPackageAsMap.put(pd.getName(), pd); } } } - return exportPackageAsList; // exportPackageAsMap.values(); + return exportPackageAsMap.values(); } public boolean hasMatchingExportPackage(PackageQuery pq) {