kinow commented on code in PR #2059:
URL: https://github.com/apache/jena/pull/2059#discussion_r1369319707
##########
jena-core/src/main/java/org/apache/jena/irix/IRIs.java:
##########
@@ -76,24 +76,32 @@ public static String getBaseStr() {
/**
* Given a candidate baseURI string, which may be a filename,
* turn it into a IRI suitable as a base IRI.
+ * This includes encoding characters in a filename (e.g. spaces).
*/
- public static String toBase(String baseURI) {
- if ( baseURI == null )
+ public static String toBase(String uriForBase) {
+ if ( uriForBase == null )
return getBaseStr();
- String scheme = scheme(baseURI);
+ String scheme = scheme(uriForBase);
if ( Sys.isWindows ) {
// Assume a scheme of one letter is a Windows drive letter.
if ( scheme != null && scheme.length() == 1 )
scheme = "file";
}
- // File scheme if the URI is "file:" or there is no scheme
- // and the system base is a "file:" URI
- boolean isFile = ( scheme != null )
- ? scheme.equals("file")
- : IRIs.getSystemBase().hasScheme("file");
- if ( isFile )
- baseURI = IRILib.encodeFileURL(baseURI);
- return IRIs.getSystemBase().resolve(baseURI).toString();
+ if ( scheme == null ) {
+ // Relative name: it the base is a file: URI, encode the relative
+ // name if it does not look like it is already encoded.
+ boolean isFileBase = ( scheme == null ) &&
IRIs.getSystemBase().hasScheme("file");
Review Comment:
This `( scheme == null )` will always be `true`, because of the `if (
scheme == null )` above.
##########
jena-fuseki2/jena-fuseki-geosparql/src/main/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverter.java:
##########
@@ -101,6 +101,7 @@ public static void writeToModel(File inputFile, Model
model, char delimiter, Boo
} catch (IOException | RuntimeException | CsvValidationException ex) {
LOGGER.error("FileConverter: Line - {}, File - {}, Exception -
{}", lineNumber, inputFile.getAbsolutePath(), ex.getMessage());
+ ex.printStackTrace();
Review Comment:
Currently debugging it? Or if intended to leave in the code maybe better to
be wrapped in another exception thrown?
--
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]