hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r687111 - in /hadoop/zookeeper/trunk/src/java: Changes.txt main/org/apache/jute/Utils.java
Date Tue, 19 Aug 2008 17:58:32 GMT
Author: mahadev
Date: Tue Aug 19 10:58:30 2008
New Revision: 687111

URL: http://svn.apache.org/viewvc?rev=687111&view=rev
Log:
ZOOKEEPER-122. Fix  NPE in jute's Utils.toCSVString. (Anthony Urso via mahadev)

Modified:
    hadoop/zookeeper/trunk/src/java/Changes.txt
    hadoop/zookeeper/trunk/src/java/main/org/apache/jute/Utils.java

Modified: hadoop/zookeeper/trunk/src/java/Changes.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/Changes.txt?rev=687111&r1=687110&r2=687111&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/Changes.txt (original)
+++ hadoop/zookeeper/trunk/src/java/Changes.txt Tue Aug 19 10:58:30 2008
@@ -12,3 +12,6 @@
 
   ZOOKEEPER-111. Significant cleanup of existing tests. (Patrick Hunt via
   mahadev)
+ 
+  ZOOKEEPER-122. Fix  NPE in jute's Utils.toCSVString. (Anthony Urso via
+  mahadev)

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/jute/Utils.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/jute/Utils.java?rev=687111&r1=687110&r2=687111&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/jute/Utils.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/jute/Utils.java Tue Aug 19 10:58:30 2008
@@ -124,8 +124,10 @@
      * @param s 
      * @return 
      */
-    static String toCSVString(String t) {
-        String s = t.toString();
+    static String toCSVString(String s) {
+        if (s == null)
+            return "";
+
         StringBuffer sb = new StringBuffer(s.length()+1);
         sb.append('\'');
         int len = s.length();



Mime
View raw message