Skip to content

Commit

Permalink
Merge pull request #3405 from DenitsaStoianova/GH-3404-Error-parsing-…
Browse files Browse the repository at this point in the history
…JSON-LD-data-with-the-default-base-URI-from-StatementsController

GH-3404-Error parsing JSON-LD data with the default base URI from StatementsController
  • Loading branch information
abrokenjester authored Nov 13, 2021
2 parents f5a3e3a + c66f1f6 commit 4e48dc5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ private ModelAndView getAddDataResult(Repository repository, HttpServletRequest
final boolean preserveNodeIds = ProtocolUtil.parseBooleanParam(request, Protocol.PRESERVE_BNODE_ID_PARAM_NAME,
false);

if (baseURI == null) {
baseURI = vf.createIRI("foo:bar");
logger.info("no base URI specified, using dummy '{}'", baseURI);
String baseURIString = null;
if (baseURI != null) {
baseURIString = baseURI.toString();
}

InputStream in = request.getInputStream();
Expand All @@ -393,7 +393,7 @@ private ModelAndView getAddDataResult(Repository repository, HttpServletRequest
if (replaceCurrent) {
repositoryCon.clear(contexts);
}
repositoryCon.add(in, baseURI.toString(), rdfFormat, contexts);
repositoryCon.add(in, baseURIString, rdfFormat, contexts);

repositoryCon.commit();

Expand Down

0 comments on commit 4e48dc5

Please sign in to comment.