Author: olga
Date: Thu Oct 15 21:08:11 2009
New Revision: 825660

URL: http://svn.apache.org/viewvc?rev=825660&view=rev
Log:
PIG-1008: FINDBUGS: NP_TOSTRING_COULD_RETURN_NULL (olgan)

Modified:
    hadoop/pig/trunk/CHANGES.txt
    hadoop/pig/trunk/src/org/apache/pig/data/DataByteArray.java
    hadoop/pig/trunk/src/org/apache/pig/impl/streaming/StreamingCommand.java

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=825660&r1=825659&r2=825660&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Thu Oct 15 21:08:11 2009
@@ -26,6 +26,8 @@
 
 IMPROVEMENTS
 
+PIG-1008: FINDBUGS: NP_TOSTRING_COULD_RETURN_NULL (olgan)
+
 PIG-1018: FINDBUGS: NM_FIELD_NAMING_CONVENTION: Field names should start with
 a lower case letter (olgan)
 

Modified: hadoop/pig/trunk/src/org/apache/pig/data/DataByteArray.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/DataByteArray.java?rev=825660&r1=825659&r2=825660&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/data/DataByteArray.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/data/DataByteArray.java Thu Oct 15 
21:08:11 2009
@@ -143,7 +143,7 @@
 
     @Override
     public String toString() {
-        String r=null;
+        String r="";
        try {
                        r = new String(mData, "UTF8");
                } catch (Exception e) {

Modified: 
hadoop/pig/trunk/src/org/apache/pig/impl/streaming/StreamingCommand.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/streaming/StreamingCommand.java?rev=825660&r1=825659&r2=825660&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/streaming/StreamingCommand.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/streaming/StreamingCommand.java 
Thu Oct 15 21:08:11 2009
@@ -503,7 +503,7 @@
         
         public boolean equals(Object obj) {
           HandleSpec other = (HandleSpec)obj;
-          return (name.equals(other.name) && spec.equals(other.spec));
+          return (other != null && name.equals(other.name) && 
spec.equals(other.spec));
         }
 
 


Reply via email to