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


##########
jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java:
##########
@@ -171,6 +172,16 @@ public static ReaderRIOTFactory getFactory(Lang language) {
     /** return true if the language is registered with the quads parser 
factories */
     public static boolean isQuads(Lang lang)   { return 
langQuads.contains(lang); }
 
+    /** Return registered triple languages. */
+    public static Set<Lang> registeredLangTriples() {
+        return Collections.unmodifiableCollection(langTriples);
+    }

Review Comment:
   Better is `Set.copyOf(langTriples)` because it is isolated and thread safe.
   
   Bonus for changing `RDFWriterRegistry.registered*Formats` to use `copyOf`.



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