jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1553547 - /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java
Date Thu, 26 Dec 2013 18:33:05 GMT
Author: juanpablo
Date: Thu Dec 26 18:33:05 2013
New Revision: 1553547

URL: http://svn.apache.org/r1553547
Log:
sonar: toString method may return null

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java?rev=1553547&r1=1553546&r2=1553547&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java Thu Dec
26 18:33:05 2013
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.NDC;
 import org.apache.wiki.WatchDog;
 import org.apache.wiki.WikiContext;
@@ -329,7 +330,7 @@ public class WikiJSPFilter extends WikiS
             catch( IOException e )
             {
                 log.error( MyServletResponseWrapper.class + " toString() flushBuffer() Failed",
e );
-                return null;
+                return StringUtils.EMPTY;
             }
             
             return m_output.toString();
@@ -414,12 +415,12 @@ public class WikiJSPFilter extends WikiS
             catch( UnsupportedEncodingException e )
             {
                 log.error( ByteArrayResponseWrapper.class + " Unsupported Encoding", e );
-                return null;
+                return StringUtils.EMPTY;
             }
             catch( IOException e )
             {
                 log.error( ByteArrayResponseWrapper.class + " toString() Flush Failed", e
);
-                return null;
+                return StringUtils.EMPTY;
             }
         }
     }



Mime
View raw message