From 378921bae0e65b620c6af06e7f01b4bbc2443ec2b9951726d2632dc06d174fd1 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 17:41:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=32 --- aqute-bnd.changes | 4 +- aqute-bnd.spec | 4 +- bnd-maven-plugin.changes | 6 +- bnd-maven-plugin.spec | 4 +- reproducible-element-order.patch | 425 ++++++++++++++++++++++++++ reproducible-packages-list.patch | 27 -- reproducible-require-capability.patch | 39 --- 7 files changed, 431 insertions(+), 78 deletions(-) create mode 100644 reproducible-element-order.patch delete mode 100644 reproducible-packages-list.patch delete mode 100644 reproducible-require-capability.patch diff --git a/aqute-bnd.changes b/aqute-bnd.changes index 6e16c3d..5abd6e0 100644 --- a/aqute-bnd.changes +++ b/aqute-bnd.changes @@ -5,8 +5,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-packages-list.patch - + make the order of packages to import/export determininstic + * reproducible-element-order.patch + + make the order of elements in manifest deterministic ------------------------------------------------------------------- Thu May 4 14:25:12 UTC 2023 - Dominique Leuenberger diff --git a/aqute-bnd.spec b/aqute-bnd.spec index 0ef4d42..eb8b5d3 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -37,8 +37,7 @@ Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch -Patch6: reproducible-packages-list.patch -Patch7: reproducible-require-capability.patch +Patch6: reproducible-element-order.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -100,7 +99,6 @@ build-jar-repository -s lib \ %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 # the commands pull in more dependencies than we want (felix-resolver, jetty, jtwig, javapackager) rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand,ExportReportCommand,MbrCommand,ReporterLogger}.java diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index 306743b..9a809f9 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -5,10 +5,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-packages-list.patch - + make the order of packages to import/export deterministic - * reproducible-require-capability.patch - + make the order of require-capabilities entries deterministic + * reproducible-element-order.patch + + make the order of elements in manifest deterministic ------------------------------------------------------------------- Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index f153d8f..54a9277 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -30,8 +30,7 @@ Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch -Patch6: reproducible-packages-list.patch -Patch7: reproducible-require-capability.patch +Patch6: reproducible-element-order.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) @@ -67,7 +66,6 @@ API documentation for %{name}. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 pushd maven %pom_remove_dep -r :biz.aQute.bnd.maven diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch new file mode 100644 index 0000000..2ebbf4c --- /dev/null +++ b/reproducible-element-order.patch @@ -0,0 +1,425 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java +index 761f48ef..4c9b3efd 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java +@@ -14,10 +14,10 @@ import java.net.URLClassLoader; + import java.net.URLConnection; + import java.net.URLStreamHandler; + import java.util.Enumeration; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Objects; ++import java.util.TreeMap; + import java.util.concurrent.ScheduledFuture; + import java.util.concurrent.TimeUnit; + import java.util.concurrent.atomic.AtomicBoolean; +@@ -35,7 +35,7 @@ import aQute.lib.io.IO; + * This class loader can load classes from JAR files. + */ + class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { +- final AtomicReference> wrappers = new AtomicReference<>(new LinkedHashMap<>()); ++ final AtomicReference> wrappers = new AtomicReference<>(new TreeMap<>()); + final AtomicBoolean open = new AtomicBoolean(true); + final Processor processor; + ScheduledFuture schedule; +@@ -89,7 +89,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { + throw new IllegalStateException("Already closed"); + } + wrappers.updateAndGet(map -> { +- Map copy = new LinkedHashMap<>(map); ++ Map copy = new TreeMap<>(map); + copy.computeIfAbsent(file, Wrapper::new); + return copy; + }); +@@ -183,7 +183,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { + if (schedule != null) { + schedule.cancel(true); + } +- wrappers.getAndSet(new LinkedHashMap<>()) ++ wrappers.getAndSet(new TreeMap<>()) + .values() + .forEach(Wrapper::close); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java +index bf5029ae..533eea3d 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java +@@ -43,7 +43,6 @@ import java.util.EnumSet; + import java.util.HashMap; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; +@@ -2144,7 +2143,7 @@ public class Analyzer extends Processor { + .distinct() + .filter(this::isProvider) + .map(TypeRef::getPackageRef) +- .collect(toCollection(LinkedHashSet::new)); ++ .collect(toCollection(TreeSet::new)); + return providers; + } + +@@ -2686,7 +2685,7 @@ public class Analyzer extends Processor { + + // Look at the referred packages + // and copy them to our baseline +- Set refs = new LinkedHashSet<>(clazz.getReferred()); ++ Set refs = new TreeSet<>(clazz.getReferred()); + refs.addAll(referencesByAnnotation(clazz)); + for (PackageRef p : refs) { + referred.put(p); +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java +index 685c92e1..c3f10b29 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java +@@ -6,9 +6,9 @@ import java.lang.annotation.RetentionPolicy; + import java.util.Arrays; + import java.util.Collections; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Map.Entry; ++import java.util.TreeMap; + import java.util.Set; + import java.util.stream.Stream; + +@@ -150,7 +150,7 @@ public class Annotation { + + public void put(String string, Object v) { + if (elements == null) { +- elements = new LinkedHashMap<>(); ++ elements = new TreeMap<>(); + } + elements.put(string, v); + } +@@ -193,7 +193,7 @@ public class Annotation { + + public T getAnnotation(Class c) throws Exception { + if (elements == null) { +- elements = new LinkedHashMap<>(); ++ elements = new TreeMap<>(); + } + return CONVERTER.convert(c, elements); + } +@@ -211,7 +211,7 @@ public class Annotation { + return; + } + if (elements == null) { +- elements = new LinkedHashMap<>(map); ++ elements = new TreeMap<>(map); + } else { + map.forEach(elements::putIfAbsent); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java +index b97251b5..e0e315bf 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java +@@ -32,7 +32,6 @@ import java.util.Deque; + import java.util.EnumSet; + import java.util.HashMap; + import java.util.HashSet; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Optional; +@@ -40,6 +39,7 @@ import java.util.Properties; + import java.util.Set; + import java.util.Spliterator; + import java.util.Spliterators.AbstractSpliterator; ++import java.util.TreeMap; + import java.util.function.Consumer; + import java.util.function.Function; + import java.util.function.Predicate; +@@ -1478,7 +1478,7 @@ public class Clazz { + + private Map annotationValues(ElementValueInfo[] values, ElementType elementType, + RetentionPolicy policy, int access_flags) { +- Map elements = new LinkedHashMap<>(); ++ Map elements = new TreeMap<>(); + for (ElementValueInfo elementValueInfo : values) { + String element = elementValueInfo.name; + Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags); +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java +index bf1d13c4..277d8f00 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java +@@ -9,10 +9,10 @@ import java.util.Collection; + import java.util.Collections; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + import java.util.concurrent.atomic.AtomicBoolean; + import java.util.function.Function; + +@@ -23,13 +23,13 @@ import aQute.lib.collections.MultiMap; + import aQute.lib.io.IO; + + public class Instructions implements Map { +- private LinkedHashMap map; ++ private TreeMap map; + public static Instructions ALWAYS = new Instructions(); + static Map EMPTY = Collections.emptyMap(); + + public Instructions(Instructions other) { + if (other.map != null && !other.map.isEmpty()) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + } + +@@ -134,7 +134,7 @@ public class Instructions implements Map { + @Override + public Attrs put(Instruction key, Attrs value) { + if (map == null) +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + + return map.put(key, value); + } +@@ -144,7 +144,7 @@ public class Instructions implements Map { + if (this.map == null) { + if (map.isEmpty()) + return; +- this.map = new LinkedHashMap<>(); ++ this.map = new TreeMap<>(); + } + this.map.putAll(map); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +index 47312379..f9996bd8 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +@@ -29,7 +29,6 @@ import java.util.Date; + import java.util.Deque; + import java.util.Formatter; + import java.util.Iterator; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Locale; +@@ -42,6 +41,7 @@ import java.util.Random; + import java.util.Set; + import java.util.TimeZone; + import java.util.TreeMap; ++import java.util.TreeSet; + import java.util.concurrent.ConcurrentHashMap; + import java.util.function.BiFunction; + import java.util.function.Function; +@@ -2166,7 +2166,7 @@ public class Macro { + * @return a map with commands and their help + */ + public Map getCommands() { +- Set targets = new LinkedHashSet<>(); ++ Set targets = new TreeSet<>(); + Collections.addAll(targets, this.targets); + Processor rover = domain; + while (rover != null) { +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +index 6e0cd11d..6bd42dcd 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +@@ -1,9 +1,9 @@ + package aQute.bnd.osgi; + + import java.util.Collection; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + + import aQute.bnd.header.Attrs; + import aQute.bnd.osgi.Descriptors.PackageRef; +@@ -21,11 +21,11 @@ public class Packages implements Map { + } + + public Packages(Packages other) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + + public Packages() { +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + } + + @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java +index ca5d496d..c65c493e 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java +@@ -31,7 +31,6 @@ import java.util.Collection; + import java.util.Collections; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Map.Entry; +@@ -41,6 +40,7 @@ import java.util.Properties; + import java.util.Random; + import java.util.Set; + import java.util.Spliterator; ++import java.util.TreeMap; + import java.util.TreeSet; + import java.util.concurrent.CopyOnWriteArrayList; + import java.util.concurrent.CopyOnWriteArraySet; +@@ -942,11 +942,11 @@ public class Processor extends Domain implements Reporter, Registry, Constants, + } + + public static Map newMap() { +- return new LinkedHashMap<>(); ++ return new TreeMap<>(); + } + + public static Map newHashMap() { +- return new LinkedHashMap<>(); ++ return new TreeMap<>(); + } + + public List newList(Collection t) { +@@ -958,7 +958,7 @@ public class Processor extends Domain implements Reporter, Registry, Constants, + } + + public Map newMap(Map t) { +- return new LinkedHashMap<>(t); ++ return new TreeMap<>(t); + } + + @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java +index 3f9a2be9..2daf737c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java +@@ -5,11 +5,11 @@ import java.io.FileNotFoundException; + import java.io.IOException; + import java.util.ArrayList; + import java.util.HashMap; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; + import java.util.StringTokenizer; ++import java.util.TreeSet; + import java.util.regex.Matcher; + import java.util.regex.Pattern; + +@@ -34,18 +34,18 @@ public class EclipseClasspath { + static final DocumentBuilderFactory documentBuilderFactory = XML.newDocumentBuilderFactory(); + File project; + File workspace; +- Set sources = new LinkedHashSet<>(); +- Set allSources = new LinkedHashSet<>(); ++ Set sources = new TreeSet<>(); ++ Set allSources = new TreeSet<>(); + +- Set classpath = new LinkedHashSet<>(); ++ Set classpath = new TreeSet<>(); + List dependents = new ArrayList<>(); + File output; + boolean recurse = true; +- Set exports = new LinkedHashSet<>(); ++ Set exports = new TreeSet<>(); + Map properties = new HashMap<>(); + Reporter reporter; + int options; +- Set bootclasspath = new LinkedHashSet<>(); ++ Set bootclasspath = new TreeSet<>(); + + public final static int DO_VARIABLES = 1; + +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java +index 4cf286bc..8ef64202 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java +@@ -5,10 +5,10 @@ import static java.util.stream.Collectors.toMap; + + import java.util.ArrayList; + import java.util.Collection; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeSet; + import java.util.concurrent.ConcurrentHashMap; + import java.util.function.Predicate; + import java.util.stream.Collector; +@@ -24,7 +24,7 @@ public class ResourcesRepository extends BaseRepository { + private final Map>> cache; + + public ResourcesRepository() { +- resources = new LinkedHashSet<>(); ++ resources = new TreeSet<>(); + cache = new ConcurrentHashMap<>(); + } + +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java +index 9ac735f6..6e022641 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java +@@ -9,10 +9,10 @@ import java.net.URI; + import java.net.URISyntaxException; + import java.nio.file.Path; + import java.util.Collection; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeSet; + import java.util.stream.Collectors; + + import org.osgi.resource.Resource; +@@ -67,7 +67,7 @@ public class SimpleIndexer { + void analyzeFile(File file, ResourceBuilder resourceBuilder) throws Exception; + } + +- private final Set files = new LinkedHashSet<>(); ++ private final Set files = new TreeSet<>(); + private Path base; + private boolean compress = false; + private String name; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +index ebb8463a..e624009c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +@@ -11,8 +11,6 @@ import java.net.URI; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Comparator; +-import java.util.LinkedHashMap; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; +@@ -20,6 +18,7 @@ import java.util.Map.Entry; + import java.util.Optional; + import java.util.Set; + import java.util.TreeMap; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.jar.Manifest; + +@@ -101,7 +100,7 @@ public class ResourceBuilder { + } + + private static void add(Map> map, String namespace, CR capreq) { +- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) ++ map.computeIfAbsent(namespace, k -> new TreeSet<>()) + .add(capreq); + } + +@@ -672,7 +671,7 @@ public class ResourceBuilder { + } + + public Map from(Resource bundle) { +- Map mapping = new LinkedHashMap<>(); ++ Map mapping = new TreeMap<>(); + + addRequirements(bundle.getRequirements(null)); + diff --git a/reproducible-packages-list.patch b/reproducible-packages-list.patch deleted file mode 100644 index e1dec44..0000000 --- a/reproducible-packages-list.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -@@ -1,9 +1,9 @@ - package aQute.bnd.osgi; - - import java.util.Collection; --import java.util.LinkedHashMap; - import java.util.Map; - import java.util.Set; -+import java.util.TreeMap; - - import aQute.bnd.header.Attrs; - import aQute.bnd.osgi.Descriptors.PackageRef; -@@ -21,11 +21,11 @@ public class Packages implements Map { - } - - public Packages(Packages other) { -- map = new LinkedHashMap<>(other.map); -+ map = new TreeMap<>(other.map); - } - - public Packages() { -- map = new LinkedHashMap<>(); -+ map = new TreeMap<>(); - } - - @Override diff --git a/reproducible-require-capability.patch b/reproducible-require-capability.patch deleted file mode 100644 index a4b3898..0000000 --- a/reproducible-require-capability.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -index ebb8463a..e624009c 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -@@ -11,8 +11,6 @@ import java.net.URI; - import java.util.ArrayList; - import java.util.Collections; - import java.util.Comparator; --import java.util.LinkedHashMap; --import java.util.LinkedHashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Map; -@@ -20,6 +18,7 @@ import java.util.Map.Entry; - import java.util.Optional; - import java.util.Set; - import java.util.TreeMap; -+import java.util.TreeSet; - import java.util.function.Supplier; - import java.util.jar.Manifest; - -@@ -101,7 +100,7 @@ public class ResourceBuilder { - } - - private static void add(Map> map, String namespace, CR capreq) { -- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) -+ map.computeIfAbsent(namespace, k -> new TreeSet<>()) - .add(capreq); - } - -@@ -672,7 +671,7 @@ public class ResourceBuilder { - } - - public Map from(Resource bundle) { -- Map mapping = new LinkedHashMap<>(); -+ Map mapping = new TreeMap<>(); - - addRequirements(bundle.getRequirements(null)); -