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


##########
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:
   Thank you for the clarification. 
   
   The test is wrong.
   It even says so! It looks like the test should be fixed.
   
   
https://github.com/apache/jena/blob/fc01d33e6c11eed68784f820bf2dd161868d1d37/jena-arq/src/test/java/org/apache/jena/riot/system/AbstractTestPrefixMap.java#L325
   
   This is abstract. In which actual subclass are you seeing a failure?
   
   ---
   
   `PrefixMapping` is the original for a model API.
   It is not suitable for large scale storage even with the `PrefixMappingImpl` 
simplified system interface. from the way it manages the reverse mapping and 
because, by contract, obeys XML qname rules for abbreviation.
   
   `PrefixMap` is the result of that experience. Simpler, lower-level. 
   `PrefixMapping` is stil used in the Model API for compatibility.
   
   
   



-- 
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