This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch FELIX-6529
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/FELIX-6529 by this push:
new 3c13adfced Don't intern value and remove a cleanup that got in by
accident
3c13adfced is described below
commit 3c13adfcede132ef6f62c95ee1773edbf1e5b02f
Author: Karl Pauls <[email protected]>
AuthorDate: Wed May 18 18:05:26 2022 +0200
Don't intern value and remove a cleanup that got in by accident
---
.../src/main/java/org/apache/felix/framework/cache/BundleCache.java | 4 +---
framework/src/main/java/org/apache/felix/framework/util/Util.java | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git
a/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
b/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
index d11533c5b8..27e59da68e 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
@@ -336,9 +336,7 @@ public class BundleCache
// Otherwise, parse the value and add it to the map (we throw
an
// exception if we don't have a key or the key already exist.
String value = new String(bytes, last, (current - last),
"UTF-8");
- if (value.length() < 100) {
- value = value.intern();
- }
+
if (key == null)
{
throw new Exception("Manifest error: Missing attribute
name - " + value);
diff --git a/framework/src/main/java/org/apache/felix/framework/util/Util.java
b/framework/src/main/java/org/apache/felix/framework/util/Util.java
index 1745efe121..ee2545286e 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/Util.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/Util.java
@@ -1090,8 +1090,8 @@ public class Util
return manifest;
}
- private static final List EMPTY_LIST = Collections.EMPTY_LIST;
- private static final Map EMPTY_MAP = Collections.EMPTY_MAP;
+ private static final List EMPTY_LIST =
Collections.unmodifiableList(Collections.EMPTY_LIST);
+ private static final Map EMPTY_MAP =
Collections.unmodifiableMap(Collections.EMPTY_MAP);
public static <T> List<T> newImmutableList(List<T> list)
{