afs commented on code in PR #2097:
URL: https://github.com/apache/jena/pull/2097#discussion_r1398227301


##########
jena-core/src/main/java/org/apache/jena/shared/impl/PrefixMappingImpl.java:
##########
@@ -187,7 +189,7 @@ public String getNsPrefixURI( String prefix )
         
     @Override
     public Map<String, String> getNsPrefixMap()
-        { return CollectionFactory.createHashedMap( prefixToURI ); }
+        { return new LinkedHashMap<>( prefixToURI ); }

Review Comment:
   This doesn't give a predictable order because `prefixToURI`  is a hash map 
and is not predicatable.
   
   `LinkedHashMap` is insertion order. `LinkedHashMap(Map m)` does "for(Entry : 
m.entrySet) put".
   
   The contract is "Map". Any order of entries. If that breaks something, then 
the "something" is more likely wrong.
   
   Where are you seeing a problem?
   
   This is not #2096.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to