afs commented on code in PR #1682:
URL: https://github.com/apache/jena/pull/1682#discussion_r1050657427
##########
jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java:
##########
@@ -301,22 +301,32 @@ public static boolean contains(RDFFormat format)
/** All registered graph formats */
public static Collection<RDFFormat> registeredGraphFormats() {
- return Collections.unmodifiableSet(registryGraph.keySet()) ;
+ return Set.copyOf(registryGraph.keySet()) ;
}
/** All registered dataset formats */
public static Collection<RDFFormat> registeredDatasetFormats() {
- return Collections.unmodifiableSet(registryDataset.keySet()) ;
+ return Set.copyOf(registryDataset.keySet()) ;
+ }
+
+ /** All registered formats */
+ public static Collection<RDFFormat> registeredFormats() {
+ return registered();
}
/** All registered formats */
public static Collection<RDFFormat> registered() {
Set<RDFFormat> x = new HashSet<>() ;
x.addAll(registryGraph.keySet()) ;
x.addAll(registryDataset.keySet()) ;
- return Collections.unmodifiableSet(x) ;
+ return Set.copyOf(x) ;
}
Review Comment:
Let's deprecate this and remove it in a later release.
`registeredFormats` is the implementation.
`registered()` calls `registeredFormats`.
--
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]