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 2018/02/06 10:17:39 UTC

jena git commit: Protect against null parameter

Repository: jena
Updated Branches:
  refs/heads/master f1ed0e2b7 -> 0bcaaaa1e


Protect against null parameter


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

Branch: refs/heads/master
Commit: 0bcaaaa1e44948d3f2aea18869b98b3d350bd92d
Parents: f1ed0e2
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Feb 6 10:12:52 2018 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Feb 6 10:12:52 2018 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/fuseki/FusekiLib.java          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/0bcaaaa1/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
index 3f68563..823593a 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
@@ -128,11 +128,13 @@ public class FusekiLib {
     
     public static String safeParameter(HttpServletRequest request, String pName) {
         String value = request.getParameter(pName) ;
+        if ( value == null )
+            return null ;
         value = value.replace("\r", "") ;
         value = value.replace("\n", "") ;
         return value ;
     }
-    
+
     // Do the addition directly on the dataset
     public static void addDataInto(Graph data, DatasetGraph dsg, Node graphName) {
         // Prefixes?