You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/06/25 14:36:24 UTC

[5/6] jena git commit: Set the parser source.

Set the parser source.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d983310b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d983310b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d983310b

Branch: refs/heads/master
Commit: d983310bb87d07a467946542968a938bcc09744b
Parents: 7d9bb0d
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Jun 24 13:40:33 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Jun 24 13:44:30 2017 +0100

----------------------------------------------------------------------
 .../jena/fuseki/validation/html/DataValidatorHTML.java       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d983310b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/DataValidatorHTML.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/DataValidatorHTML.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/DataValidatorHTML.java
index bf18836..8017dbe 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/DataValidatorHTML.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/html/DataValidatorHTML.java
@@ -65,6 +65,9 @@ public class DataValidatorHTML
                 return ;
             }
             
+            // Take the charset provided even if it is wrong because 
+            // HTML input maybe have been written in some default.
+            // The HTML input and what the user typed should agree.
             Reader input = createInput(httpRequest, httpResponse) ;
 
             ServletOutputStream outStream = httpResponse.getOutputStream() ;
@@ -82,7 +85,7 @@ public class DataValidatorHTML
             outStream.println("<body>") ;
             
             outStream.println("<h1>RIOT Parser Report</h1>") ;
-            outStream.println("<p>Line and column numbers refer to original input</p>") ;
+            outStream.println("<p>Line and column numbers refer to the original input.</p>") ;
             outStream.println("<p>&nbsp;</p>") ;
 
             // Need to escape HTML. 
@@ -90,13 +93,14 @@ public class DataValidatorHTML
             StreamRDF output = StreamRDFWriter.getWriterStream(output1, Lang.NQUADS) ;
             try {
                 startFixed(outStream) ;
+                @SuppressWarnings("deprecation")
                 RDFParser parser = RDFParser.create()
+                    .source(input)
                     .lang(language)
                     .errorHandler(errorHandler)
                     .resolveURIs(false)
                     .build();
                 RiotException exception = null ;
-                startFixed(outStream) ;
                 try {
                     output.start();
                     parser.parse(output);