This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-xmlschema.git


The following commit(s) were added to refs/heads/master by this push:
     new c5e03d08 XMLSCHEMA-65: Make XmlSchemaCollection return schemas in a 
predictable order
     new a7c9c75e Merge pull request #17 from bjornvester/xmlschema-65
c5e03d08 is described below

commit c5e03d087e3ea287ed51cabb6cca90e39bdfa100
Author: Bjørn Mølgård Vester <[email protected]>
AuthorDate: Mon Sep 4 17:24:42 2023 +0200

    XMLSCHEMA-65: Make XmlSchemaCollection return schemas in a predictable order
---
 .../main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
 
b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
index abec80c1..33b0ed8c 100644
--- 
a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
+++ 
b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
@@ -31,6 +31,7 @@ import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Deque;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -276,7 +277,7 @@ public final class XmlSchemaCollection {
         extReg = new ExtensionRegistry();
         knownNamespaceMap = new HashMap<String, XmlSchema>();
         schemaResolver = new DefaultURIResolver();
-        schemas = new HashMap<SchemaKey, XmlSchema>();
+        schemas = new LinkedHashMap<SchemaKey, XmlSchema>();
         // LAST, since the ctor for XmlSchema will reach back into here. 
         xsd = new XmlSchema(XmlSchema.SCHEMA_NS, this);
         /*

Reply via email to