Author: olga
Date: Wed Oct 21 20:53:07 2009
New Revision: 828208

URL: http://svn.apache.org/viewvc?rev=828208&view=rev
Log:
PIG-1028: FINDBUGS: DM_NUMBER_CTOR: Method invokes inefficient Number
constructor; use static valueOf instead (olgan)

Modified:
    hadoop/pig/trunk/CHANGES.txt
    
hadoop/pig/trunk/lib-src/shock/org/apache/pig/shock/SSHSocketImplFactory.java
    hadoop/pig/trunk/src/org/apache/pig/Main.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
    hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MultiQueryOptimizer.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/POPackageAnnotator.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POCast.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Subtract.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrangeForIllustrate.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java
    hadoop/pig/trunk/src/org/apache/pig/data/DataReaderWriter.java
    hadoop/pig/trunk/src/org/apache/pig/data/DataType.java
    hadoop/pig/trunk/src/org/apache/pig/impl/builtin/FindQuantiles.java
    hadoop/pig/trunk/src/org/apache/pig/impl/builtin/GFReplicate.java
    hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java
    hadoop/pig/trunk/src/org/apache/pig/pen/AugmentBaseDataVisitor.java
    hadoop/pig/trunk/src/org/apache/pig/tools/cmdline/CmdLineParser.java

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Wed Oct 21 20:53:07 2009
@@ -26,6 +26,9 @@
 
 IMPROVEMENTS
 
+PIG-1028: FINDBUGS: DM_NUMBER_CTOR: Method invokes inefficient Number
+constructor; use static valueOf instead (olgan)
+
 PIG-1012: FINDBUGS: SE_BAD_FIELD: Non-transient non-serializable instance 
field in
 serializable class (olgan)
 

Modified: 
hadoop/pig/trunk/lib-src/shock/org/apache/pig/shock/SSHSocketImplFactory.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/lib-src/shock/org/apache/pig/shock/SSHSocketImplFactory.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/lib-src/shock/org/apache/pig/shock/SSHSocketImplFactory.java 
(original)
+++ 
hadoop/pig/trunk/lib-src/shock/org/apache/pig/shock/SSHSocketImplFactory.java 
Wed Oct 21 20:53:07 2009
@@ -438,7 +438,7 @@
 
     public Object getOption(int optID) throws SocketException {
         if (optID == SocketOptions.SO_SNDBUF)
-            return new Integer(1024);
+            return Integer.valueOf(1024);
         else
                    throw new SocketException("SSHSocketImpl does not implement 
getOption for " + optID);
     }

Modified: hadoop/pig/trunk/src/org/apache/pig/Main.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/Main.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/Main.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/Main.java Wed Oct 21 20:53:07 2009
@@ -256,7 +256,7 @@
                     }
                 break;
             default: {
-                Character cc = new Character(opt);
+                Character cc = Character.valueOf(opt);
                 throw new AssertionError("Unhandled option " + cc.toString());
                      }
             }

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
 Wed Oct 21 20:53:07 2009
@@ -75,8 +75,8 @@
             throw new RuntimeException("Failed to create DataStorage", e);
         }
         short defaultReplication = fs.getDefaultReplication();
-        properties.setProperty(DEFAULT_REPLICATION_FACTOR_KEY, (new Short(
-                defaultReplication)).toString());
+        properties.setProperty(DEFAULT_REPLICATION_FACTOR_KEY, 
+                               Short.valueOf(defaultReplication).toString());
     }
 
     public void close() throws IOException {
@@ -112,16 +112,16 @@
         Map<String, Object> stats = new HashMap<String, Object>();
 
         long usedBytes = fs.getUsed();
-        stats.put(USED_BYTES_KEY , new Long(usedBytes).toString());
+        stats.put(USED_BYTES_KEY , Long.valueOf(usedBytes).toString());
         
         if (fs instanceof DistributedFileSystem) {
             DistributedFileSystem dfs = (DistributedFileSystem) fs;
             
             long rawCapacityBytes = dfs.getRawCapacity();
-            stats.put(RAW_CAPACITY_KEY, new Long(rawCapacityBytes).toString());
+            stats.put(RAW_CAPACITY_KEY, 
Long.valueOf(rawCapacityBytes).toString());
             
             long rawUsedBytes = dfs.getRawUsed();
-            stats.put(RAW_USED_KEY, new Long(rawUsedBytes).toString());
+            stats.put(RAW_USED_KEY, Long.valueOf(rawUsedBytes).toString());
         }
         
         return stats;

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java 
Wed Oct 21 20:53:07 2009
@@ -125,8 +125,8 @@
 
         short replication = fs.getHFS().getFileStatus(path).getReplication();
         
-        props.setProperty(BLOCK_SIZE_KEY, (new Long(blockSize)).toString());
-        props.setProperty(BLOCK_REPLICATION_KEY, (new 
Short(replication)).toString());
+        props.setProperty(BLOCK_SIZE_KEY, 
(Long.valueOf(blockSize)).toString());
+        props.setProperty(BLOCK_REPLICATION_KEY, 
(Short.valueOf(replication)).toString());
         
         return props;
     }

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MultiQueryOptimizer.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MultiQueryOptimizer.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MultiQueryOptimizer.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MultiQueryOptimizer.java
 Wed Oct 21 20:53:07 2009
@@ -641,7 +641,7 @@
             throw new OptimizerException(msg, errCode, PigException.BUG);
         }
         int existingIndex = existingIndices.iterator().next();
-        keyInfo.put(new Integer(newIndex), keyInfo.get(existingIndex));
+        keyInfo.put(Integer.valueOf(newIndex), keyInfo.get(existingIndex));
         
         // clean up the old entry so we only keep
         // the valid entry around - if we did something wrong while

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/POPackageAnnotator.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/POPackageAnnotator.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/POPackageAnnotator.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/POPackageAnnotator.java
 Wed Oct 21 20:53:07 2009
@@ -222,7 +222,7 @@
                 throw new OptimizerException(msg, errCode, PigException.BUG);
                 
             }
-            keyInfo.put(new Integer(lrearrange.getIndex()), 
+            keyInfo.put(Integer.valueOf(lrearrange.getIndex()), 
                 new Pair<Boolean, Map<Integer, Integer>>(
                         lrearrange.isProjectStar(), 
lrearrange.getProjectedColsMap()));
             pkg.setKeyInfo(keyInfo);

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java
 Wed Oct 21 20:53:07 2009
@@ -116,7 +116,7 @@
         }
         right = (Integer) res.result;
         
-        res.result = new Integer(left + right);
+        res.result = Integer.valueOf(left + right);
         return res;
     }
     
@@ -139,7 +139,7 @@
         }
         right = (Long) res.result;
         
-        res.result = new Long(left + right);
+        res.result = Long.valueOf(left + right);
         return res;
     }
 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java
 Wed Oct 21 20:53:07 2009
@@ -138,7 +138,7 @@
                res.result = null;
         }
         else
-            res.result = new Integer(left / right);
+            res.result = Integer.valueOf(left / right);
         return res;
     }
     
@@ -168,7 +168,7 @@
             res.result = null;
         }
         else
-            res.result = new Long(left / right);
+            res.result = Long.valueOf(left / right);
         return res;
     }
 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java
 Wed Oct 21 20:53:07 2009
@@ -70,7 +70,7 @@
         }
         right = (Integer) res.result;
         
-        res.result = new Integer(left % right);
+        res.result = Integer.valueOf(left % right);
         return res;
     }
     
@@ -93,7 +93,7 @@
         }
         right = (Long) res.result;
         
-        res.result = new Long(left % right);
+        res.result = Long.valueOf(left % right);
         return res;
     }
 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java
 Wed Oct 21 20:53:07 2009
@@ -116,7 +116,7 @@
         }
         right = (Integer) res.result;
         
-        res.result = new Integer(left * right);
+        res.result = Integer.valueOf(left * right);
         return res;
     }
     
@@ -139,7 +139,7 @@
         }
         right = (Long) res.result;
         
-        res.result = new Long(left * right);
+        res.result = Long.valueOf(left * right);
         return res;
     }
 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POCast.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POCast.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POCast.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POCast.java
 Wed Oct 21 20:53:07 2009
@@ -162,9 +162,9 @@
             Result res = in.getNext(b);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
                 if (((Boolean) res.result) == true)
-                    res.result = new Integer(1);
+                    res.result = Integer.valueOf(1);
                 else
-                    res.result = new Integer(0);
+                    res.result = Integer.valueOf(0);
             }
             return res;
         }
@@ -179,7 +179,7 @@
             Result res = in.getNext(d);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
                 // res.result = DataType.toInteger(res.result);
-                res.result = new Integer(((Double) res.result).intValue());
+                res.result = Integer.valueOf(((Double) res.result).intValue());
             }
             return res;
         }
@@ -188,7 +188,7 @@
             Long l = null;
             Result res = in.getNext(l);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
-                res.result = new Integer(((Long) res.result).intValue());
+                res.result = Integer.valueOf(((Long) res.result).intValue());
             }
             return res;
         }
@@ -197,7 +197,7 @@
             Float f = null;
             Result res = in.getNext(f);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
-                res.result = new Integer(((Float) res.result).intValue());
+                res.result = Integer.valueOf(((Float) res.result).intValue());
             }
             return res;
         }
@@ -283,9 +283,9 @@
             Result res = in.getNext(b);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
                 if (((Boolean) res.result) == true)
-                    res.result = new Long(1);
+                    res.result = Long.valueOf(1);
                 else
-                    res.result = new Long(0);
+                    res.result = Long.valueOf(0);
             }
             return res;
         }
@@ -293,7 +293,7 @@
             Integer dummyI = null;
             Result res = in.getNext(dummyI);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
-                res.result = new Long(((Integer) res.result).longValue());
+                res.result = Long.valueOf(((Integer) res.result).longValue());
             }
             return res;
         }
@@ -303,7 +303,7 @@
             Result res = in.getNext(d);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
                 // res.result = DataType.toInteger(res.result);
-                res.result = new Long(((Double) res.result).longValue());
+                res.result = Long.valueOf(((Double) res.result).longValue());
             }
             return res;
         }
@@ -319,7 +319,7 @@
             Float f = null;
             Result res = in.getNext(f);
             if (res.returnStatus == POStatus.STATUS_OK && res.result != null) {
-                res.result = new Long(((Float) res.result).longValue());
+                res.result = Long.valueOf(((Float) res.result).longValue());
             }
             return res;
         }

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Subtract.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Subtract.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Subtract.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Subtract.java
 Wed Oct 21 20:53:07 2009
@@ -116,7 +116,7 @@
         }
         right = (Integer) res.result;
         
-        res.result = new Integer(left - right);
+        res.result = Integer.valueOf(left - right);
         return res;
     }
     
@@ -139,7 +139,7 @@
         }
         right = (Long) res.result;
         
-        res.result = new Long(left - right);
+        res.result = Long.valueOf(left - right);
         return res;
     }
 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
 Wed Oct 21 20:53:07 2009
@@ -203,7 +203,7 @@
             // indices and hence would go to different invocation of reduce()
             this.index = multiQuery ? (byte)(index | 
PigNullableWritable.mqFlag) : (byte)index;
         }            
-        lrOutput.set(0, new Byte(this.index));
+        lrOutput.set(0, Byte.valueOf(this.index));
     }
     
     public boolean isDistinct() { 

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrangeForIllustrate.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrangeForIllustrate.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrangeForIllustrate.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrangeForIllustrate.java
 Wed Oct 21 20:53:07 2009
@@ -95,7 +95,7 @@
 
             //Put the key and the indexed tuple
             //in a tuple and return
-            output.set(0, new Byte((byte)0));
+            output.set(0, Byte.valueOf((byte)0));
             output.set(1, key);
             output.set(2, mFakeTuple);
             return output;
@@ -107,7 +107,7 @@
 
             //Put the index, key, and value
             //in a tuple and return
-            output.set(0, new Byte(index));
+            output.set(0, Byte.valueOf(index));
             output.set(1, key);
             output.set(2, value);
             return output;

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java Wed Oct 21 20:53:07 
2009
@@ -33,7 +33,7 @@
     public Integer exec(Tuple input) throws IOException {
         try{
             if (input == null) return null;
-            return new Integer(input.size());
+            return Integer.valueOf(input.size());
         } catch (Exception e) {
             int errCode = 2106;
             String msg = "Error while computing arity in " + 
this.getClass().getSimpleName();

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java Wed Oct 21 20:53:07 
2009
@@ -195,7 +195,7 @@
         } else {
             output.set(0, null);
         }
-        output.set(1, new Long(count));
+        output.set(1, Long.valueOf(count));
         return output;
     }
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java Wed Oct 21 
20:53:07 2009
@@ -36,7 +36,7 @@
     public Long exec(Tuple input) throws IOException {
         try {
             DataBag bag = (DataBag)(input.get(0));
-            return bag == null ? null : new Long(bag.size());
+            return bag == null ? null : Long.valueOf(bag.size());
         } catch (ExecException exp) {
             throw exp;
         } catch (Exception e) {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java Wed Oct 21 
20:53:07 2009
@@ -202,7 +202,7 @@
     public Integer bytesToInteger(byte[] b) {
         DataInputStream dis = new DataInputStream(new ByteArrayInputStream(b));
         try {
-            return new Integer(dis.readInt());
+            return Integer.valueOf(dis.readInt());
         } catch (IOException e) {
             LogUtils.warn(this, "Unable to convert bytearray to integer, " +
                     "caught IOException <" + e.getMessage() + ">",
@@ -216,7 +216,7 @@
     public Long bytesToLong(byte[] b) {
         DataInputStream dis = new DataInputStream(new ByteArrayInputStream(b));
         try {
-            return new Long(dis.readLong());
+            return Long.valueOf(dis.readLong());
         } catch (IOException e) {
             LogUtils.warn(this, "Unable to convert bytearray to long, " +
                     "caught IOException <" + e.getMessage() + ">",

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java Wed Oct 21 20:53:07 
2009
@@ -85,9 +85,9 @@
             if (it.hasNext()){
                 Tuple t = (Tuple)it.next();
                 if (t != null && t.size() > 0 && t.get(0) != null)
-                    return mTupleFactory.newTuple(new Long(1));
+                    return mTupleFactory.newTuple(Long.valueOf(1));
             }
-            return mTupleFactory.newTuple(new Long(0));
+            return mTupleFactory.newTuple(Long.valueOf(0));
         }
     }
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java Wed Oct 21 
20:53:07 2009
@@ -35,7 +35,7 @@
     @Override
     public Long exec(Tuple input) throws IOException {
         try {
-           return input.get(0) == null ? null : new Long(1);
+           return input.get(0) == null ? null : Long.valueOf(1);
         } catch (ExecException exp) {
             throw exp;
         } catch (Exception e) {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java Wed Oct 21 
20:53:07 2009
@@ -182,7 +182,7 @@
         } else {
             output.set(0, null);
         }
-        output.set(1, new Long(count));
+        output.set(1, Long.valueOf(count));
         return output;
     }
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java Wed Oct 21 
20:53:07 2009
@@ -178,7 +178,7 @@
         } else {
             output.set(0, null);
         }
-        output.set(1, new Long(count));
+        output.set(1, Long.valueOf(count));
         return output;
     }
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java Wed Oct 21 20:53:07 
2009
@@ -86,7 +86,7 @@
                     Tuple tp = bg.iterator().next();
                     i = (Integer)tp.get(0);
                 }
-                t.set(0, i != null ? new Long(i): null);
+                t.set(0, i != null ? Long.valueOf(i): null);
                 if (i != null)
                     t.set(1, 1L);
                 else
@@ -175,11 +175,11 @@
             count += (Long)t.get(1);
         }
         if(sawNonNull) {
-            output.set(0, new Long(sum));
+            output.set(0, Long.valueOf(sum));
         } else {
             output.set(0, null);
         }
-        output.set(1, new Long(count));
+        output.set(1, Long.valueOf(count));
         return output;
     }
 
@@ -225,7 +225,7 @@
         }
 
         if(sawNonNull) {
-            return new Long(sum);
+            return Long.valueOf(sum);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java Wed Oct 21 20:53:07 
2009
@@ -142,7 +142,7 @@
         }
 
         if(sawNonNull) {
-            return new Integer(curMax);
+            return Integer.valueOf(curMax);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java Wed Oct 21 20:53:07 
2009
@@ -144,7 +144,7 @@
         }
     
         if(sawNonNull) {
-            return new Integer(curMin);
+            return Integer.valueOf(curMin);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java Wed Oct 21 20:53:07 
2009
@@ -78,7 +78,7 @@
                     i = (Integer)tp.get(0);
                 }
                 return tfact.newTuple(i != null ? 
-                        new Long(i) : null);
+                        Long.valueOf(i) : null);
             }catch(NumberFormatException nfe){
                 // treat this particular input as null
                 return tfact.newTuple(null);
@@ -151,7 +151,7 @@
 
         
         if(sawNonNull) {
-            return new Long(sum);
+            return Long.valueOf(sum);
         } else {
             return null;
         }
@@ -184,7 +184,7 @@
 
         
         if(sawNonNull) {
-            return new Long(sum);
+            return Long.valueOf(sum);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java Wed Oct 21 
20:53:07 2009
@@ -174,11 +174,11 @@
             count += (Long)t.get(1);
         }
         if(sawNonNull) {
-            output.set(0, new Long(sum));
+            output.set(0, Long.valueOf(sum));
         } else {
             output.set(0, null);
         }
-        output.set(1, new Long(count));
+        output.set(1, Long.valueOf(count));
         return output;
     }
 
@@ -220,7 +220,7 @@
         }
 
         if(sawNonNull) {
-            return new Long(sum);
+            return Long.valueOf(sum);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java Wed Oct 21 
20:53:07 2009
@@ -142,7 +142,7 @@
         }
 
         if(sawNonNull) {
-            return new Long(curMax);
+            return Long.valueOf(curMax);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java Wed Oct 21 
20:53:07 2009
@@ -142,7 +142,7 @@
         }
     
         if(sawNonNull) {
-            return new Long(curMin);
+            return Long.valueOf(curMin);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java Wed Oct 21 
20:53:07 2009
@@ -145,7 +145,7 @@
         }
 
         if(sawNonNull) {
-            return new Long(sum);
+            return Long.valueOf(sum);
         } else {
             return null;
         }

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java Wed Oct 21 
20:53:07 2009
@@ -37,7 +37,7 @@
     public Long exec(Tuple input) throws IOException {
         try {
             Map<String, Object> m = (Map<String, Object>)(input.get(0));
-            return m == null ? null : new Long(m.keySet().size());
+            return m == null ? null : Long.valueOf(m.keySet().size());
         } catch (ExecException exp) {
             throw exp;
         } catch (Exception e) {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java Wed Oct 21 20:53:07 
2009
@@ -41,7 +41,7 @@
     public Long exec(Tuple input) throws IOException {
         try {
             DataByteArray dba = (DataByteArray)(input.get(0));
-            return dba == null ? null : new Long(dba.size());
+            return dba == null ? null : Long.valueOf(dba.size());
         } catch (ExecException exp) {
             throw exp;
         } catch (Exception e) {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java Wed Oct 21 
20:53:07 2009
@@ -35,7 +35,7 @@
     public Long exec(Tuple input) throws IOException {
         try {
                String s = (String)(input.get(0));
-            return s == null ? null : new Long(s.length());
+            return s == null ? null : Long.valueOf(s.length());
         } catch (ExecException exp) {
             throw exp;            
         } catch (Exception e) {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java Wed Oct 21 
20:53:07 2009
@@ -35,7 +35,7 @@
     public Long exec(Tuple input) throws IOException {
         try{
             if (input == null) return null;
-            return new Long(input.size());
+            return Long.valueOf(input.size());
         }catch(Exception e){
             int errCode = 2106;
             String msg = "Error while computing size in " + 
this.getClass().getSimpleName();

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=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java Wed 
Oct 21 20:53:07 2009
@@ -50,8 +50,8 @@
     protected TupleFactory mTupleFactory = TupleFactory.getInstance();
     protected final Log mLog = LogFactory.getLog(getClass());
 
-    private Integer mMaxInt = new Integer(Integer.MAX_VALUE);
-    private Long mMaxLong = new Long(Long.MAX_VALUE);
+    private Integer mMaxInt = Integer.valueOf(Integer.MAX_VALUE);
+    private Long mMaxLong = Long.valueOf(Long.MAX_VALUE);
     private TextDataParser dataParser = null;
     
     private PigLogger pigLogger = PhysicalOperator.getPigLogger();
@@ -154,7 +154,7 @@
                                 PigWarning.TOO_LARGE_FOR_INT, mLog);
                     return null;
                 }
-                return new Integer(d.intValue());
+                return Integer.valueOf(d.intValue());
             } catch (NumberFormatException nfe2) {
                 LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                         "converted to int, caught NumberFormatException <" +
@@ -193,7 +193,7 @@
                                    PigWarning.TOO_LARGE_FOR_INT, mLog);
                     return null;
                 }
-                return new Long(d.longValue());
+                return Long.valueOf(d.longValue());
             } catch (NumberFormatException nfe2) {
                 LogUtils.warn(this, "Unable to interpret value " + 
Arrays.toString(b) + " in field being " +
                             "converted to long, caught NumberFormatException 
<" +

Modified: hadoop/pig/trunk/src/org/apache/pig/data/DataReaderWriter.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/DataReaderWriter.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/data/DataReaderWriter.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/data/DataReaderWriter.java Wed Oct 21 
20:53:07 2009
@@ -119,22 +119,22 @@
                 return bytesToInternalMap(in);    
 
             case DataType.INTEGER:
-                return new Integer(in.readInt());
+                return Integer.valueOf(in.readInt());
 
             case DataType.LONG:
-                return new Long(in.readLong());
+                return Long.valueOf(in.readLong());
 
             case DataType.FLOAT:
-                return new Float(in.readFloat());
+                return Float.valueOf(in.readFloat());
 
             case DataType.DOUBLE:
-                return new Double(in.readDouble());
+                return Double.valueOf(in.readDouble());
 
             case DataType.BOOLEAN:
-                return new Boolean(in.readBoolean());
+                return Boolean.valueOf(in.readBoolean());
 
             case DataType.BYTE:
-                return new Byte(in.readByte());
+                return Byte.valueOf(in.readByte());
 
             case DataType.BYTEARRAY: {
                 int size = in.readInt();

Modified: hadoop/pig/trunk/src/org/apache/pig/data/DataType.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/DataType.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/data/DataType.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/data/DataType.java Wed Oct 21 20:53:07 
2009
@@ -398,23 +398,23 @@
         try {
                        switch (type) {
                        case BOOLEAN:
-                           if (((Boolean)o) == true) return new Integer(1);
-                           else return new Integer(0);
+                           if (((Boolean)o) == true) return Integer.valueOf(1);
+                           else return Integer.valueOf(0);
 
                        case BYTE:
-                           return new Integer(((Byte)o).intValue());
+                           return Integer.valueOf(((Byte)o).intValue());
 
                        case INTEGER:
                            return (Integer)o;
 
                        case LONG:
-                           return new Integer(((Long)o).intValue());
+                           return Integer.valueOf(((Long)o).intValue());
 
                        case FLOAT:
-                           return new Integer(((Float)o).intValue());
+                           return Integer.valueOf(((Float)o).intValue());
 
                        case DOUBLE:
-                           return new Integer(((Double)o).intValue());
+                           return Integer.valueOf(((Double)o).intValue());
 
                        case BYTEARRAY:
                            return 
Integer.valueOf(((DataByteArray)o).toString());
@@ -475,23 +475,23 @@
         try {
                        switch (type) {
                        case BOOLEAN:
-                           if (((Boolean)o) == true) return new Long(1);
-                           else return new Long(0);
+                           if (((Boolean)o) == true) return Long.valueOf(1);
+                           else return Long.valueOf(0);
 
                        case BYTE:
-                           return new Long(((Byte)o).longValue());
+                           return Long.valueOf(((Byte)o).longValue());
 
                        case INTEGER:
-                           return new Long(((Integer)o).longValue());
+                           return Long.valueOf(((Integer)o).longValue());
 
                        case LONG:
                            return (Long)o;
 
                        case FLOAT:
-                           return new Long(((Float)o).longValue());
+                           return Long.valueOf(((Float)o).longValue());
 
                        case DOUBLE:
-                           return new Long(((Double)o).longValue());
+                           return Long.valueOf(((Double)o).longValue());
 
                        case BYTEARRAY:
                            return Long.valueOf(((DataByteArray)o).toString());

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/builtin/FindQuantiles.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/builtin/FindQuantiles.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/builtin/FindQuantiles.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/builtin/FindQuantiles.java Wed Oct 
21 20:53:07 2009
@@ -202,7 +202,7 @@
             for (Tuple it : samples){
                 ++i;
                 if (i % 1000 == 0) progress();
-                int partInd = new Long(i/toSkip).intValue(); // which partition
+                int partInd = (int)(i/toSkip); // which partition
                 if(partInd==numQuantiles) break;
                 // the quantiles array has the element from the sample which 
is the
                 // last element for a given partition. For example: if 
numQuantiles 

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/builtin/GFReplicate.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/builtin/GFReplicate.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/builtin/GFReplicate.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/builtin/GFReplicate.java Wed Oct 
21 20:53:07 2009
@@ -42,7 +42,7 @@
     public DataBag exec(Tuple input) throws IOException {
         DataBag b = mBagFactory.newDefaultBag();
         for (int i = 0; i < numGroups; i++) {
-            b.add(mTupleFactory.newTuple(new Integer(1)));
+            b.add(mTupleFactory.newTuple(Integer.valueOf(1)));
         }
         return b;
     }

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java Wed 
Oct 21 20:53:07 2009
@@ -456,7 +456,7 @@
         // deep copy project specific attributes
         clone.mProjection = new ArrayList<Integer>();
         for (Iterator<Integer> it = mProjection.iterator(); it.hasNext();) {
-            clone.mProjection.add(new Integer(it.next()));
+            clone.mProjection.add(Integer.valueOf(it.next()));
         }
         
         return clone;

Modified: hadoop/pig/trunk/src/org/apache/pig/pen/AugmentBaseDataVisitor.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/pen/AugmentBaseDataVisitor.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/pen/AugmentBaseDataVisitor.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/pen/AugmentBaseDataVisitor.java Wed Oct 
21 20:53:07 2009
@@ -844,13 +844,13 @@
             else
                 return null;
         case DataType.INTEGER:
-            return new Integer((Integer) v - 1);
+            return Integer.valueOf((Integer) v - 1);
         case DataType.LONG:
-            return new Long((Long) v - 1);
+            return Long.valueOf((Long) v - 1);
         case DataType.FLOAT:
-            return new Float((Float) v - 1);
+            return Float.valueOf((Float) v - 1);
         case DataType.DOUBLE:
-            return new Double((Double) v - 1);
+            return Double.valueOf((Double) v - 1);
         default:
             return null;
         }
@@ -872,13 +872,13 @@
             str = str + "0";
             return new DataByteArray(str);
         case DataType.INTEGER:
-            return new Integer((Integer) v + 1);
+            return Integer.valueOf((Integer) v + 1);
         case DataType.LONG:
-            return new Long((Long) v + 1);
+            return Long.valueOf((Long) v + 1);
         case DataType.FLOAT:
-            return new Float((Float) v + 1);
+            return Float.valueOf((Float) v + 1);
         case DataType.DOUBLE:
-            return new Double((Double) v + 1);
+            return Double.valueOf((Double) v + 1);
         default:
             return null;
         }
@@ -887,17 +887,17 @@
     Object generateData(byte type, String data) {
         switch (type) {
         case DataType.BOOLEAN:
-            return new Boolean(data);
+            return Boolean.valueOf(data);
         case DataType.BYTEARRAY:
             return new DataByteArray(data.getBytes());
         case DataType.DOUBLE:
-            return new Double(data);
+            return Double.valueOf(data);
         case DataType.FLOAT:
-            return new Float(data);
+            return Float.valueOf(data);
         case DataType.INTEGER:
-            return new Integer(data);
+            return Integer.valueOf(data);
         case DataType.LONG:
-            return new Long(data);
+            return Long.valueOf(data);
         case DataType.CHARARRAY:
             return data;
         default:

Modified: hadoop/pig/trunk/src/org/apache/pig/tools/cmdline/CmdLineParser.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/tools/cmdline/CmdLineParser.java?rev=828208&r1=828207&r2=828208&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/tools/cmdline/CmdLineParser.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/tools/cmdline/CmdLineParser.java Wed 
Oct 21 20:53:07 2009
@@ -66,7 +66,7 @@
         throw new AssertionError("CmdLineParser:  '-' is not a legal single 
character designator.");
     }
 
-    Character cc = new Character(c);
+    Character cc = Character.valueOf(c);
     if (mShort.put(cc, ve) != null) {
         throw new AssertionError("CmdLineParser:  You have already registered 
option " + cc.toString());
     }
@@ -110,11 +110,11 @@
 
         Character cc = null;
         if (arg.substring(offset).length() == 1) {
-            cc = new Character(arg.substring(offset).charAt(0));
+            cc = Character.valueOf(arg.substring(offset).charAt(0));
         } else {
             cc = mLong.get(arg.substring(offset));
             if (cc == null) {
-                Integer ii = new Integer(mArgNum + 1);
+                Integer ii = Integer.valueOf(mArgNum + 1);
                 String errMsg = "Found unknown option (" + arg + ") at 
position " +
                     ii.toString();
                 throw new ParseException(errMsg, mArgNum);
@@ -123,7 +123,7 @@
 
         ValueExpected ve = mShort.get(cc);
         if (ve == null) {
-            Integer ii = new Integer(mArgNum + 1);
+            Integer ii = Integer.valueOf(mArgNum + 1);
             String errMsg = "Found unknown option (" + arg + ") at position " +
                 ii.toString();
             throw new ParseException(errMsg, mArgNum);


Reply via email to