Skip to content

Commit c865d2b

Browse files
Fix Turtle and Trig parser to pass W3C standard test suite NullPointerException
1 parent 673f3b5 commit c865d2b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/fr/inria/corese/core/next/impl/io/parser/util/ParserConstants.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ private ParserConstants() {
9494
* @return the default base URI from configuration, or null if not set
9595
*/
9696
public static String getDefaultBaseURI() {
97-
return Property.getStringValue(Property.Value.DEFAULT_BASE_URI);
97+
String configuredValue = Property.getStringValue(Property.Value.DEFAULT_BASE_URI);
98+
if (configuredValue == null || configuredValue.isEmpty()) {
99+
return "http://example.org/";
100+
}
101+
return configuredValue;
98102
}
99103
}

0 commit comments

Comments
 (0)