This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-bundle-tracker.git
The following commit(s) were added to refs/heads/master by this push:
new 37fa866 Use a LinkedHashSet instead of a HashSet to keep the order
the same.
37fa866 is described below
commit 37fa866c915a18144fe425508236d7266b449ee3
Author: Karl Pauls <[email protected]>
AuthorDate: Thu Apr 9 15:01:56 2020 +0200
Use a LinkedHashSet instead of a HashSet to keep the order the same.
---
.../sling/scripting/bundle/tracker/internal/BundledScriptTracker.java | 1 +
.../sling/scripting/bundle/tracker/internal/ServletCapability.java | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/BundledScriptTracker.java
b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/BundledScriptTracker.java
index df959d0..fd995e6 100644
---
a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/BundledScriptTracker.java
+++
b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/BundledScriptTracker.java
@@ -240,6 +240,7 @@ public class BundledScriptTracker implements
BundleTrackerCustomizer<List<Servic
ServletResolverConstants.SLING_SERVLET_EXTENSIONS +
"=" + extensions + "; " +
ServletResolverConstants.SLING_SERVLET_METHODS + "=" +
methods + "}");
properties.put(BundledHooks.class.getName(), "true");
+
reg =
registeringBundle.orElse(m_context).registerService(Servlet.class, new
DispatcherServlet(rt), properties);
} else {
if (!new HashSet<>(Arrays.asList(PropertiesUtil
diff --git
a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ServletCapability.java
b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ServletCapability.java
index f782fe4..1d7d2c5 100644
---
a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ServletCapability.java
+++
b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ServletCapability.java
@@ -21,6 +21,7 @@ package org.apache.sling.scripting.bundle.tracker.internal;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -122,7 +123,7 @@ class ServletCapability {
static ServletCapability fromBundleCapability(@NotNull BundleCapability
capability) {
Map<String, Object> attributes = capability.getAttributes();
- Set<ResourceType> resourceTypes = new HashSet<>();
+ Set<ResourceType> resourceTypes = new LinkedHashSet<>();
String[] capabilityResourceTypes =
PropertiesUtil.toStringArray(attributes.get(ServletResolverConstants.SLING_SERVLET_RESOURCE_TYPES),
new String[0]);
Version version = (Version)
attributes.get(BundledScriptTracker.AT_VERSION);