This commit is contained in:
parent
8091701655
commit
8b89b2acd0
@ -1,3 +1,28 @@
|
|||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java
|
||||||
|
index d3916f63..ae84ca14 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java
|
||||||
|
@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER;
|
||||||
|
import static java.util.stream.Collectors.toList;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
-import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeMap;
|
||||||
|
import java.util.stream.Collector;
|
||||||
|
|
||||||
|
import aQute.bnd.stream.MapStream;
|
||||||
|
@@ -19,7 +19,7 @@ public class Parameters implements Map<String, Attrs> {
|
||||||
|
|
||||||
|
public Parameters(boolean allowDuplicateAttributes) {
|
||||||
|
this.allowDuplicateAttributes = allowDuplicateAttributes;
|
||||||
|
- map = new LinkedHashMap<>();
|
||||||
|
+ map = new TreeMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Parameters() {
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java
|
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
|
index 761f48ef..4c9b3efd 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java
|
||||||
@ -113,15 +138,75 @@ index 685c92e1..c3f10b29 100644
|
|||||||
} else {
|
} else {
|
||||||
map.forEach(elements::putIfAbsent);
|
map.forEach(elements::putIfAbsent);
|
||||||
}
|
}
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java
|
||||||
|
index 7ee4b2a5..ade0577c 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java
|
||||||
|
@@ -8,7 +8,6 @@ import java.io.IOException;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Optional;
|
||||||
|
@@ -151,7 +150,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable {
|
||||||
|
// The annotations we could not load. used to avoid repeatedly logging the
|
||||||
|
// same missing annotation for the same project. Note that this should not
|
||||||
|
// be reset for each #classStart(Clazz).
|
||||||
|
- final Set<String> loggedMissing = new HashSet<>();
|
||||||
|
+ final Set<String> loggedMissing = new TreeSet<>();
|
||||||
|
final Instructions instructions;
|
||||||
|
|
||||||
|
// we parse the annotations separately at the end
|
||||||
|
@@ -394,7 +393,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable {
|
||||||
|
handleAttributeOrDirective(a);
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
- Set<String> processed = new HashSet<>(this.processed);
|
||||||
|
+ Set<String> processed = new TreeSet<>(this.processed);
|
||||||
|
processed.add(c.getFQN());
|
||||||
|
doAnnotatedAnnotation(a, a.getName(), processed, attributesAndDirectives);
|
||||||
|
break;
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
|
||||||
|
index cbeb4452..9b03e520 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
|
||||||
|
@@ -14,13 +14,13 @@ import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.jar.Manifest;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
@@ -489,7 +489,7 @@ public class Builder extends Analyzer {
|
||||||
|
.toStringWithoutQualifier();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- Set<String> visited = new HashSet<>();
|
||||||
|
+ Set<String> visited = new TreeSet<>();
|
||||||
|
|
||||||
|
for (Map.Entry<PackageRef, Attrs> entry : packages.entrySet()) {
|
||||||
|
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java
|
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
|
index b97251b5..a3f8644f 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java
|
||||||
+++ b/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;
|
@@ -31,8 +31,7 @@ import java.util.Comparator;
|
||||||
|
import java.util.Deque;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
-import java.util.HashSet;
|
||||||
-import java.util.LinkedHashMap;
|
-import java.util.LinkedHashMap;
|
||||||
|
+import java.util.TreeSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@ -133,6 +218,33 @@ index b97251b5..e0e315bf 100644
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
@@ -735,7 +735,7 @@ public class Clazz {
|
||||||
|
private boolean hasDefaultConstructor;
|
||||||
|
|
||||||
|
private Set<PackageRef> imports = Create.set();
|
||||||
|
- private Set<TypeRef> xref = new HashSet<>();
|
||||||
|
+ private Set<TypeRef> xref = new TreeSet<>();
|
||||||
|
private Set<TypeRef> annotations;
|
||||||
|
private int forName = 0;
|
||||||
|
private int class$ = 0;
|
||||||
|
@@ -803,7 +803,7 @@ public class Clazz {
|
||||||
|
referred = new HashMap<>(constantPool.size());
|
||||||
|
|
||||||
|
if (classDef.isPublic()) {
|
||||||
|
- api = new HashSet<>();
|
||||||
|
+ api = new TreeSet<>();
|
||||||
|
}
|
||||||
|
if (!classDef.isModule()) {
|
||||||
|
referTo(classDef.getType(), Modifier.PUBLIC);
|
||||||
|
@@ -1430,7 +1430,7 @@ public class Clazz {
|
||||||
|
private void processAnnotation(AnnotationInfo annotationInfo, ElementType elementType, RetentionPolicy policy,
|
||||||
|
int access_flags) {
|
||||||
|
if (annotations == null) {
|
||||||
|
- annotations = new HashSet<>();
|
||||||
|
+ annotations = new TreeSet<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
String typeName = annotationInfo.type;
|
||||||
@@ -1478,7 +1478,7 @@ public class Clazz {
|
@@ -1478,7 +1478,7 @@ public class Clazz {
|
||||||
|
|
||||||
private Map<String, Object> annotationValues(ElementValueInfo[] values, ElementType elementType,
|
private Map<String, Object> annotationValues(ElementValueInfo[] values, ElementType elementType,
|
||||||
@ -142,6 +254,109 @@ index b97251b5..e0e315bf 100644
|
|||||||
for (ElementValueInfo elementValueInfo : values) {
|
for (ElementValueInfo elementValueInfo : values) {
|
||||||
String element = elementValueInfo.name;
|
String element = elementValueInfo.name;
|
||||||
Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags);
|
Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags);
|
||||||
|
@@ -1706,7 +1706,7 @@ public class Clazz {
|
||||||
|
Spliterator<TypeRef> spliterator = new AbstractSpliterator<TypeRef>(Long.MAX_VALUE,
|
||||||
|
Spliterator.DISTINCT | Spliterator.ORDERED | Spliterator.NONNULL) {
|
||||||
|
private final Deque<TypeRef> queue = new ArrayDeque<>(func.apply(Clazz.this));
|
||||||
|
- private final Set<TypeRef> seen = (visited != null) ? visited : new HashSet<>();
|
||||||
|
+ private final Set<TypeRef> seen = (visited != null) ? visited : new TreeSet<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean tryAdvance(Consumer<? super TypeRef> action) {
|
||||||
|
@@ -1758,7 +1758,7 @@ public class Clazz {
|
||||||
|
|
||||||
|
case IMPLEMENTS : {
|
||||||
|
requireNonNull(instr);
|
||||||
|
- Set<TypeRef> visited = new HashSet<>();
|
||||||
|
+ Set<TypeRef> visited = new TreeSet<>();
|
||||||
|
return hierarchyStream(analyzer).flatMap(c -> c.typeStream(analyzer, Clazz::interfaces, visited))
|
||||||
|
.map(TypeRef::getDottedOnly)
|
||||||
|
.anyMatch(instr::matches) ^ instr.isNegated();
|
||||||
|
@@ -1787,7 +1787,7 @@ public class Clazz {
|
||||||
|
|
||||||
|
case INDIRECTLY_ANNOTATED : {
|
||||||
|
requireNonNull(instr);
|
||||||
|
- return typeStream(analyzer, Clazz::annotations, new HashSet<>()) //
|
||||||
|
+ return typeStream(analyzer, Clazz::annotations, new TreeSet<>()) //
|
||||||
|
.map(TypeRef::getFQN)
|
||||||
|
.anyMatch(instr::matches) ^ instr.isNegated();
|
||||||
|
}
|
||||||
|
@@ -1802,7 +1802,7 @@ public class Clazz {
|
||||||
|
|
||||||
|
case HIERARCHY_INDIRECTLY_ANNOTATED : {
|
||||||
|
requireNonNull(instr);
|
||||||
|
- Set<TypeRef> visited = new HashSet<>();
|
||||||
|
+ Set<TypeRef> visited = new TreeSet<>();
|
||||||
|
return hierarchyStream(analyzer) //
|
||||||
|
.flatMap(c -> c.typeStream(analyzer, Clazz::annotations, visited))
|
||||||
|
.map(TypeRef::getFQN)
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
|
||||||
|
index d6ab2fd0..4824c91a 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
|
||||||
|
@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Formatter;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
|
||||||
|
import org.osgi.namespace.contract.ContractNamespace;
|
||||||
|
import org.osgi.resource.Namespace;
|
||||||
|
@@ -36,7 +36,7 @@ class Contracts {
|
||||||
|
Contract.class, true);
|
||||||
|
private MultiMap<Collection<Contract>, PackageRef> overlappingContracts = new MultiMap<>();
|
||||||
|
private Instructions instructions;
|
||||||
|
- private final Set<Contract> contracts = new HashSet<>();
|
||||||
|
+ private final Set<Contract> contracts = new TreeSet<>();
|
||||||
|
|
||||||
|
public class Contract {
|
||||||
|
public String name;
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java
|
||||||
|
index 3576bd87..d86ce7c1 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java
|
||||||
|
@@ -27,7 +27,6 @@ import java.util.Arrays;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.NavigableMap;
|
||||||
|
@@ -548,9 +547,9 @@ public class Jar implements Closeable {
|
||||||
|
// default is DEFLATED
|
||||||
|
}
|
||||||
|
|
||||||
|
- Set<String> done = new HashSet<>();
|
||||||
|
+ Set<String> done = new TreeSet<>();
|
||||||
|
|
||||||
|
- Set<String> directories = new HashSet<>();
|
||||||
|
+ Set<String> directories = new TreeSet<>();
|
||||||
|
if (doNotTouchManifest) {
|
||||||
|
Resource r = getResource(manifestName);
|
||||||
|
if (r != null) {
|
||||||
|
@@ -588,7 +587,7 @@ public class Jar implements Closeable {
|
||||||
|
|
||||||
|
check();
|
||||||
|
|
||||||
|
- Set<String> done = new HashSet<>();
|
||||||
|
+ Set<String> done = new TreeSet<>();
|
||||||
|
|
||||||
|
if (doNotTouchManifest) {
|
||||||
|
Resource r = getResource(manifestName);
|
||||||
|
@@ -1281,7 +1280,7 @@ public class Jar implements Closeable {
|
||||||
|
public void stripSignatures() {
|
||||||
|
Map<String, Resource> map = getDirectory("META-INF");
|
||||||
|
if (map != null) {
|
||||||
|
- for (String file : new HashSet<>(map.keySet())) {
|
||||||
|
+ for (String file : new TreeSet<>(map.keySet())) {
|
||||||
|
if (SIGNER_FILES_P.matcher(file)
|
||||||
|
.matches())
|
||||||
|
remove(file);
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java
|
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
|
index 47312379..f9996bd8 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java
|
||||||
@ -200,6 +415,27 @@ index 6e0cd11d..6bd42dcd 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java
|
||||||
|
index e7721390..c9f654df 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java
|
||||||
|
@@ -4,7 +4,6 @@ import static java.util.stream.Collectors.toCollection;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
@@ -150,7 +149,7 @@ public class PermissionGenerator {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<String> visit(Or expr) {
|
||||||
|
- Set<String> matches = new HashSet<>();
|
||||||
|
+ Set<String> matches = new TreeSet<>();
|
||||||
|
for (Expression expression : expr.getExpressions()) {
|
||||||
|
matches.addAll(expression.visit(this));
|
||||||
|
}
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java
|
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
|
index ca5d496d..c65c493e 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java
|
||||||
@ -243,6 +479,74 @@ index ca5d496d..c65c493e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java
|
||||||
|
index 982e229b..5ea80f10 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java
|
||||||
|
@@ -4,7 +4,6 @@ import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Formatter;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
@@ -565,7 +564,7 @@ public class Verifier extends Processor {
|
||||||
|
if (!unresolvedReferences.isEmpty()) {
|
||||||
|
// Now we want to know the
|
||||||
|
// classes that are the culprits
|
||||||
|
- Set<String> culprits = new HashSet<>();
|
||||||
|
+ Set<String> culprits = new TreeSet<>();
|
||||||
|
for (Clazz clazz : analyzer.getClassspace()
|
||||||
|
.values()) {
|
||||||
|
if (hasOverlap(unresolvedReferences, clazz.getReferred()))
|
||||||
|
@@ -674,7 +673,7 @@ public class Verifier extends Processor {
|
||||||
|
if (!since(About._2_3))
|
||||||
|
return;
|
||||||
|
|
||||||
|
- Set<String> invalidPaths = new HashSet<>();
|
||||||
|
+ Set<String> invalidPaths = new TreeSet<>();
|
||||||
|
Pattern pattern = ReservedFileNames;
|
||||||
|
setProperty("@", ReservedFileNames.pattern());
|
||||||
|
String p = getProperty(INVALIDFILENAMES);
|
||||||
|
@@ -690,7 +689,7 @@ public class Verifier extends Processor {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- Set<String> segments = new HashSet<>();
|
||||||
|
+ Set<String> segments = new TreeSet<>();
|
||||||
|
for (String path : dot.getResources()
|
||||||
|
.keySet()) {
|
||||||
|
String parts[] = path.split("/");
|
||||||
|
@@ -717,8 +716,8 @@ public class Verifier extends Processor {
|
||||||
|
if (isStrict()) {
|
||||||
|
Parameters map = parseHeader(manifest.getMainAttributes()
|
||||||
|
.getValue(Constants.IMPORT_PACKAGE));
|
||||||
|
- Set<String> noimports = new HashSet<>();
|
||||||
|
- Set<String> toobroadimports = new HashSet<>();
|
||||||
|
+ Set<String> noimports = new TreeSet<>();
|
||||||
|
+ Set<String> toobroadimports = new TreeSet<>();
|
||||||
|
|
||||||
|
for (Entry<String, Attrs> e : map.entrySet()) {
|
||||||
|
|
||||||
|
@@ -791,7 +790,7 @@ public class Verifier extends Processor {
|
||||||
|
if (isStrict()) {
|
||||||
|
Parameters map = parseHeader(manifest.getMainAttributes()
|
||||||
|
.getValue(Constants.EXPORT_PACKAGE));
|
||||||
|
- Set<String> noexports = new HashSet<>();
|
||||||
|
+ Set<String> noexports = new TreeSet<>();
|
||||||
|
|
||||||
|
for (Entry<String, Attrs> e : map.entrySet()) {
|
||||||
|
|
||||||
|
@@ -837,7 +836,7 @@ public class Verifier extends Processor {
|
||||||
|
String mandatory = e.getValue()
|
||||||
|
.get(Constants.MANDATORY_DIRECTIVE);
|
||||||
|
if (mandatory != null) {
|
||||||
|
- Set<String> missing = new HashSet<>(split(mandatory));
|
||||||
|
+ Set<String> missing = new TreeSet<>(split(mandatory));
|
||||||
|
missing.removeAll(e.getValue()
|
||||||
|
.keySet());
|
||||||
|
if (!missing.isEmpty()) {
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java
|
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
|
index 3f9a2be9..2daf737c 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java
|
||||||
@ -284,6 +588,71 @@ index 3f9a2be9..2daf737c 100644
|
|||||||
|
|
||||||
public final static int DO_VARIABLES = 1;
|
public final static int DO_VARIABLES = 1;
|
||||||
|
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java
|
||||||
|
index c4853157..f334a26e 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java
|
||||||
|
@@ -3,11 +3,11 @@ package aQute.bnd.osgi.repository;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
|
||||||
|
import org.osgi.resource.Capability;
|
||||||
|
import org.osgi.resource.Requirement;
|
||||||
|
@@ -42,7 +42,7 @@ public abstract class BaseRepository implements Repository {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Promise<Collection<Resource>> findProviders(RequirementExpression expression) {
|
||||||
|
- Set<Resource> providers = new HashSet<>();
|
||||||
|
+ Set<Resource> providers = new TreeSet<>();
|
||||||
|
|
||||||
|
dispatch(expression, providers);
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ public abstract class BaseRepository implements Repository {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- Set<Resource> subset = new HashSet<>();
|
||||||
|
+ Set<Resource> subset = new TreeSet<>();
|
||||||
|
dispatch(requirementExpressions.get(0), subset);
|
||||||
|
|
||||||
|
for (int i = 1; i < requirementExpressions.size(); i++) {
|
||||||
|
@@ -93,7 +93,7 @@ public abstract class BaseRepository implements Repository {
|
||||||
|
}
|
||||||
|
providers.addAll(subset);
|
||||||
|
} else if (expression instanceof NotExpression) {
|
||||||
|
- Set<Resource> allSet = new HashSet<>();
|
||||||
|
+ Set<Resource> allSet = new TreeSet<>();
|
||||||
|
dispatch(all, allSet);
|
||||||
|
RequirementExpression re = ((NotExpression) expression).getRequirementExpression();
|
||||||
|
for (Iterator<Resource> it = allSet.iterator(); it.hasNext();) {
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java
|
||||||
|
index e5356c59..39e9b55f 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java
|
||||||
|
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
@@ -196,7 +195,7 @@ public class BridgeRepository {
|
||||||
|
|
||||||
|
public BridgeRepository(Repository repository) {
|
||||||
|
this.repository = repository;
|
||||||
|
- Set<Resource> resources = new HashSet<>();
|
||||||
|
+ Set<Resource> resources = new TreeSet<>();
|
||||||
|
find(resources, allIdentity);
|
||||||
|
find(resources, allBndInfo);
|
||||||
|
resources.forEach(this::index);
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java
|
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
|
index 4cf286bc..8ef64202 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java
|
||||||
@ -334,6 +703,110 @@ index 9ac735f6..6e022641 100644
|
|||||||
private Path base;
|
private Path base;
|
||||||
private boolean compress = false;
|
private boolean compress = false;
|
||||||
private String name;
|
private String name;
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java
|
||||||
|
index 08398185..5928ea97 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java
|
||||||
|
@@ -28,11 +28,11 @@ import java.net.URISyntaxException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
import java.util.zip.GZIPOutputStream;
|
||||||
|
|
||||||
|
import org.osgi.resource.Capability;
|
||||||
|
@@ -55,7 +55,7 @@ import aQute.lib.tag.Tag;
|
||||||
|
public class XMLResourceGenerator {
|
||||||
|
|
||||||
|
private Tag repository = new Tag(TAG_REPOSITORY);
|
||||||
|
- private Set<Resource> visited = new HashSet<>();
|
||||||
|
+ private Set<Resource> visited = new TreeSet<>();
|
||||||
|
private int indent = 0;
|
||||||
|
private boolean compress = false;
|
||||||
|
private URI base;
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java
|
||||||
|
index a45738d7..50701ae9 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java
|
||||||
|
@@ -22,9 +22,9 @@ import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
|
||||||
|
import javax.xml.stream.XMLInputFactory;
|
||||||
|
import javax.xml.stream.XMLStreamConstants;
|
||||||
|
@@ -94,7 +94,7 @@ public class XMLResourceParser extends Processor {
|
||||||
|
}
|
||||||
|
|
||||||
|
public XMLResourceParser(InputStream in, String what, URI uri) throws Exception {
|
||||||
|
- this(in, what, 100, new HashSet<>(), uri);
|
||||||
|
+ this(in, what, 100, new TreeSet<>(), uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepth(int n) {
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
|
||||||
|
index f556954d..9d508c3d 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
|
||||||
|
@@ -6,12 +6,12 @@ import static java.util.stream.Collectors.toList;
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
-import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
+import java.util.TreeMap;
|
||||||
|
|
||||||
|
import org.osgi.framework.Constants;
|
||||||
|
import org.osgi.framework.Version;
|
||||||
|
@@ -49,8 +49,8 @@ public class CapReqBuilder {
|
||||||
|
|
||||||
|
private final String namespace;
|
||||||
|
private Resource resource;
|
||||||
|
- private final Map<String, Object> attributes = new HashMap<>();
|
||||||
|
- private final Map<String, String> directives = new HashMap<>();
|
||||||
|
+ private final Map<String, Object> attributes = new TreeMap<>();
|
||||||
|
+ private final Map<String, String> directives = new TreeMap<>();
|
||||||
|
|
||||||
|
public CapReqBuilder(String namespace) {
|
||||||
|
this.namespace = requireNonNull(namespace);
|
||||||
|
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java
|
||||||
|
index 89a82456..b0566f08 100644
|
||||||
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java
|
||||||
|
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java
|
||||||
|
@@ -3,10 +3,10 @@ package aQute.bnd.osgi.resource;
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
-import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
+import java.util.TreeSet;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.osgi.framework.Version;
|
||||||
|
@@ -125,7 +125,7 @@ public class PersistentResource extends DTO implements Resource {
|
||||||
|
for (Requirement req : resource.getRequirements(null))
|
||||||
|
reqMap.add(req.getNamespace(), req);
|
||||||
|
|
||||||
|
- Set<String> names = new HashSet<>(capMap.keySet());
|
||||||
|
+ Set<String> names = new TreeSet<>(capMap.keySet());
|
||||||
|
names.addAll(reqMap.keySet());
|
||||||
|
|
||||||
|
namespaces = new Namespace[names.size()];
|
||||||
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java
|
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
|
index ebb8463a..e624009c 100644
|
||||||
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java
|
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java
|
||||||
|
Loading…
x
Reference in New Issue
Block a user