Details
Description
A project I'm working on loads files at runtime and updates URIs that have place holders with the domain a web application is deployed, prior to being saved to a default or named graph with SDB. For example, mca://foo/bar/ becomes http://m.bristol.ac.uk/foo/bar/. After the jena-sdb version become 1.3.4-SNAPSHOT some of the RDF XML files were failing with the following exception:
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
at java.util.regex.Matcher.reset(Matcher.java:291)
at java.util.regex.Matcher.<init>(Matcher.java:211)
at java.util.regex.Pattern.matcher(Pattern.java:888)
at org.apache.jena.iri.impl.Parser.<init>(Parser.java:89)
at org.apache.jena.iri.impl.IRIImpl.<init>(IRIImpl.java:65)
at org.apache.jena.iri.impl.AbsIRIImpl.create(AbsIRIImpl.java:692)
at org.apache.jena.iri.IRI.resolve(IRI.java:432)
at org.openjena.riot.system.IRIResolver$IRIResolverNormal.resolveSilent(IRIResolver.java:435)
at org.openjena.riot.system.IRIResolver$IRIResolverNormal.resolve(IRIResolver.java:420)
at org.openjena.riot.system.IRIResolver.resolveIRI(IRIResolver.java:199)
at org.openjena.riot.system.IRIResolver.resolveString(IRIResolver.java:189)
at org.openjena.riot.RiotReader.createParserTriples(RiotReader.java:144)
at org.openjena.riot.RiotLoader.readTriples(RiotLoader.java:215)
I've created a reduced sample test case (using maven). If you use the dependencies linked to jena-sdb (1.3.4-SNAPSHOT) you will get the stack trace above with mvn test. If you replace the dependencies with jena-arq (2.9.0-incubating) and run mvn clean and mvn test you won't get an error but will see a list of URIs being printed to standard out.