[Dive4elements-commits] [PATCH] Add null pointer guard before encode

Wald Commits scm-commit at wald.intevation.org
Fri Jun 21 18:09:55 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1371830993 -7200
# Node ID 13ecaf6c0f207b2f074d160af4d6867da147a47c
# Parent  f579e4a80b84cebc717a362807d3d9d04dd8e8cc
Add null pointer guard before encode

diff -r f579e4a80b84 -r 13ecaf6c0f20 gwt-client/src/main/java/org/dive4elements/river/client/server/MapPrintServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapPrintServiceImpl.java	Fri Jun 21 17:36:50 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapPrintServiceImpl.java	Fri Jun 21 18:09:53 2013 +0200
@@ -399,6 +399,7 @@
 
     private static final String encode(String s) {
         try {
+            if (s == null) return null;
             return URLEncoder.encode(s, "UTF-8");
         }
         catch (UnsupportedEncodingException usee) {


More information about the Dive4elements-commits mailing list