lewismc commented on a change in pull request #144: ANY23-433 upgrade rdf4j to 
v3.0.0
URL: https://github.com/apache/any23/pull/144#discussion_r328211537
 
 

 ##########
 File path: 
core/src/main/java/org/apache/any23/extractor/rdf/BaseRDFExtractor.java
 ##########
 @@ -93,36 +90,15 @@ public void run(
     ) throws IOException, ExtractionException {
         try {
             final RDFParser parser = getParser(extractionContext, 
extractionResult);
-
-            RDFFormat format = parser.getRDFFormat();
-
-            if (format.hasFileExtension("jsonld") || 
format.hasMIMEType("application/ld+json")) {
-                in = new JsonCleaningInputStream(in);
-            }
-
             parser.parse(in, extractionContext.getDocumentIRI().stringValue());
         } catch (Exception ex) {
-            // ANY23-420: jsonld-java can sometimes throw 
IllegalArgumentException,
-            // so don't limit catch block to RDFParseExceptions
-
-            Throwable cause = ex.getCause();
-            if (cause instanceof JsonProcessingException) {
-                JsonProcessingException err = (JsonProcessingException)cause;
-                JsonLocation loc = err.getLocation();
-                if (loc == null) {
-                    extractionResult.notifyIssue(IssueReport.IssueLevel.FATAL, 
err.getOriginalMessage(), -1L, -1L);
-                } else {
-                    extractionResult.notifyIssue(IssueReport.IssueLevel.FATAL, 
err.getOriginalMessage(), loc.getLineNr(), loc.getColumnNr());
-                }
-            } else {
-                extractionResult.notifyIssue(IssueReport.IssueLevel.FATAL, 
toString(ex), -1, -1);
-            }
+            extractionResult.notifyIssue(IssueReport.IssueLevel.FATAL, 
toString(ex), -1, -1);
         }
     }
 
     // keep private to avoid backwards compatibility woes (may move around 
later)
 
 Review comment:
   This comment should be edited or removed 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to