Author: olga
Date: Mon Oct 19 20:51:41 2009
New Revision: 826804

URL: http://svn.apache.org/viewvc?rev=826804&view=rev
Log:
PIG-1013: FINDBUGS: DMI_INVOKING_TOSTRING_ON_ARRAY: Invocation of toString on
an array (olgan)

Modified:
    hadoop/pig/trunk/CHANGES.txt
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/Launcher.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java
    hadoop/pig/trunk/src/org/apache/pig/impl/PigContext.java

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=826804&r1=826803&r2=826804&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Mon Oct 19 20:51:41 2009
@@ -26,7 +26,10 @@
 
 IMPROVEMENTS
 
-PIG-1001: FINDBUGS: SE_NO_SERIALVERSIONID: Class is Serializable, but doesn't
+PIG-1013: FINDBUGS: DMI_INVOKING_TOSTRING_ON_ARRAY: Invocation of toString on
+an array (olgan)
+
+PIG-1011: FINDBUGS: SE_NO_SERIALVERSIONID: Class is Serializable, but doesn't
 define serialVersionUID (olgan)
 
 PIG-1009: FINDBUGS: OS_OPEN_STREAM: Method may fail to close stream (olgan)

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/Launcher.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/Launcher.java?rev=826804&r1=826803&r2=826804&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/Launcher.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/Launcher.java
 Mon Oct 19 20:51:41 2009
@@ -26,6 +26,7 @@
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.Arrays;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -503,7 +504,7 @@
                return (Throwable)object;
             } else { //else for if(exceptionName != null)
                        int errCode = 2055;
-                       String msg = "Did not find exception name to create 
exception from string: " + stackTraceLines.toString();
+                       String msg = "Did not find exception name to create 
exception from string: " + Arrays.toString(stackTraceLines);
                        throw new ExecException(msg, errCode, PigException.BUG);
             }
         } else { //else for if(lines.length > 0)

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java?rev=826804&r1=826803&r2=826804&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java Mon 
Oct 19 20:51:41 2009
@@ -20,6 +20,7 @@
 import java.io.IOException;
 import java.util.Map;
 import java.io.ByteArrayInputStream;
+import java.util.Arrays;
 
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.Log;
@@ -75,14 +76,14 @@
         try {
             db = (DataBag)parseFromBytes(b);
         } catch (ParseException pe) {
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type bag, caught ParseException <" +
                     pe.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
             return null;       
         }catch (Exception e){
             // can happen if parseFromBytes identifies it as being of 
different type
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type bag, caught Exception <" +
                     e.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
@@ -103,7 +104,7 @@
         try {
             return Double.valueOf(new String(b));
         } catch (NumberFormatException nfe) {
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to double, caught NumberFormatException <" +
                     nfe.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
@@ -126,7 +127,7 @@
         try {
             return Float.valueOf(s);
         } catch (NumberFormatException nfe) {
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to float, caught NumberFormatException <" +
                     nfe.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
@@ -155,7 +156,7 @@
                 }
                 return new Integer(d.intValue());
             } catch (NumberFormatException nfe2) {
-                LogUtils.warn(this, "Unable to interpret value " + b + " in 
field being " +
+                LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                         "converted to int, caught NumberFormatException <" +
                         nfe.getMessage() + "> field discarded", 
                         PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, 
mLog);
@@ -194,7 +195,7 @@
                 }
                 return new Long(d.longValue());
             } catch (NumberFormatException nfe2) {
-                LogUtils.warn(this, "Unable to interpret value " + b + " in 
field being " +
+                LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                             "converted to long, caught NumberFormatException 
<" +
                             nfe.getMessage() + "> field discarded", 
                             PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, 
mLog);
@@ -211,14 +212,14 @@
             map = (Map<String, Object>)parseFromBytes(b);
         }
         catch (ParseException pe) {
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type map, caught ParseException <" +
                     pe.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
             return null;       
         }catch (Exception e){
             // can happen if parseFromBytes identifies it as being of 
different type
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type map, caught Exception <" +
                     e.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
@@ -235,14 +236,14 @@
             t = (Tuple)parseFromBytes(b);
         } 
         catch (ParseException pe) {
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type tuple, caught ParseException <" +
                     pe.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);
             return null;       
         }catch (Exception e){
             // can happen if parseFromBytes identifies it as being of 
different type
-            LogUtils.warn(this, "Unable to interpret value " + b + " in field 
being " +
+            LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                     "converted to type tuple, caught Exception <" +
                     e.getMessage() + "> field discarded", 
                     PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED, mLog);

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/PigContext.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/PigContext.java?rev=826804&r1=826803&r2=826804&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/PigContext.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/PigContext.java Mon Oct 19 
20:51:41 2009
@@ -36,6 +36,7 @@
 import java.util.Properties;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import java.util.Arrays;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -500,7 +501,7 @@
                 sb.append("could not instantiate '");
                 sb.append(className);
                 sb.append("' with arguments '");
-                sb.append(args);
+                sb.append(Arrays.toString(args));
                 sb.append("'");
                 throw new RuntimeException(sb.toString(), e);
             }
@@ -511,7 +512,7 @@
             sb.append("could not instantiate '");
             sb.append(className);
             sb.append("' with arguments '");
-            sb.append(args);
+            sb.append(Arrays.toString(args));
             sb.append("'");
             throw new RuntimeException(sb.toString(), e);
         }


Reply via email to