afs commented on code in PR #2632:
URL: https://github.com/apache/jena/pull/2632#discussion_r1713060479
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/impl/repositories/DocumentGraphRepository.java:
##########
@@ -55,39 +54,39 @@ public DocumentGraphRepository(Supplier<Graph> factory) {
}
/**
- * Validates the specified String is a valid URI or file path.
+ * Checks whether the specified string is a valid URI or a file path.
*
- * @param fileNameOrURI to validate
+ * @param uriOrFile to validate
* @return the same string
*/
- public static String check(String fileNameOrURI) {
- Objects.requireNonNull(fileNameOrURI, "Null fileNameOrURI");
- RuntimeException ex = new RuntimeException("Wrong URI: <" +
fileNameOrURI + ">");
+ public static String checkLocation(String uriOrFile) {
+ Objects.requireNonNull(uriOrFile, "Null fileNameOrURI");
+ RuntimeException ex = new RuntimeException("Wrong URI: <" + uriOrFile
+ ">");
String file = null;
- if (fileNameOrURI.startsWith("file:")) {
Review Comment:
FYI: There is `IRILib` which has operations for file/URI.
These encapsulate normalizing `file:` URIs (e.g. `file:///...`).
--
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]