Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 86434 invoked from network); 21 Oct 2009 00:53:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 00:53:22 -0000 Received: (qmail 97152 invoked by uid 500); 21 Oct 2009 00:53:22 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 97135 invoked by uid 500); 21 Oct 2009 00:53:22 -0000 Mailing-List: contact pig-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-dev@hadoop.apache.org Received: (qmail 97125 invoked by uid 99); 21 Oct 2009 00:53:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 00:53:22 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 00:53:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 59E53234C045 for ; Tue, 20 Oct 2009 17:52:59 -0700 (PDT) Message-ID: <1611478437.1256086379360.JavaMail.jira@brutus> Date: Wed, 21 Oct 2009 00:52:59 +0000 (UTC) From: "Olga Natkovich (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Updated: (PIG-1028) FINDBUGS: DM_NUMBER_CTOR: Method invokes inefficient Number constructor; use static valueOf instead In-Reply-To: <2083882759.1255992599401.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olga Natkovich updated PIG-1028: -------------------------------- Attachment: PIG-1028.patch > FINDBUGS: DM_NUMBER_CTOR: Method invokes inefficient Number constructor; use static valueOf instead > --------------------------------------------------------------------------------------------------- > > Key: PIG-1028 > URL: https://issues.apache.org/jira/browse/PIG-1028 > Project: Pig > Issue Type: Bug > Reporter: Olga Natkovich > Assignee: Olga Natkovich > Attachments: PIG-1028.patch > > > Bx Method org.apache.pig.backend.hadoop.datastorage.HDataStorage.getStatistics() invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.datastorage.HDataStorage.init() invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead > Bx Method org.apache.pig.backend.hadoop.datastorage.HPath.getConfiguration() invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.datastorage.HPath.getConfiguration() invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer.addShiftedKeyInfoIndex(int, POPackage) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.plans.POPackageAnnotator$LoRearrangeDiscoverer.visitLocalRearrange(POLocalRearrange) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Add.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Add.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Divide.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Divide.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Mod.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Mod.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Multiply.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Multiply.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Subtract.getNext(Integer) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Subtract.getNext(Long) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLocalRearrange.setIndex(int, boolean) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead > Bx Method org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLocalRearrangeForIllustrate.constructLROutput(List, Tuple) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead > Bx Method org.apache.pig.builtin.ARITY.exec(Tuple) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.builtin.AVG.combine(DataBag) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.BagSize.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.BinStorage.bytesToInteger(byte[]) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.builtin.BinStorage.bytesToLong(byte[]) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.ConstantSize.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.COUNT$Initial.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.DoubleAvg.combine(DataBag) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.FloatAvg.combine(DataBag) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntAvg.combine(DataBag) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntAvg.sum(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntAvg$Initial.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntMax.max(Tuple) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.builtin.IntMin.min(Tuple) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.builtin.IntSum.sum(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntSum.sumLongs(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.IntSum$Initial.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.LongAvg.combine(DataBag) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.LongAvg.sum(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.LongMax.max(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.LongMin.min(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.LongSum.sum(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.MapSize.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.SIZE.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.StringSize.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.TupleSize.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method new org.apache.pig.builtin.Utf8StorageConverter() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method new org.apache.pig.builtin.Utf8StorageConverter() invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.builtin.Utf8StorageConverter.bytesToInteger(byte[]) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.builtin.Utf8StorageConverter.bytesToLong(byte[]) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.data.DataReaderWriter.readDatum(DataInput, byte) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead > Bx Method org.apache.pig.data.DataReaderWriter.readDatum(DataInput, byte) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.data.DataReaderWriter.readDatum(DataInput, byte) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.data.DataType.toInteger(Object, byte) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.data.DataType.toLong(Object, byte) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Primitive value is boxed then unboxed to perform primative coercion in org.apache.pig.impl.builtin.FindQuantiles.exec(Tuple) > Bx Method org.apache.pig.impl.builtin.FindQuantiles.exec(Tuple) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.impl.builtin.GFReplicate.exec(Tuple) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.impl.logicalLayer.LOProject.clone() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.Main.main(String[]) invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead > Bx Method org.apache.pig.pen.AugmentBaseDataVisitor.GetLargerValue(Object) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.pen.AugmentBaseDataVisitor.GetLargerValue(Object) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.pen.AugmentBaseDataVisitor.GetSmallerValue(Object) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > At AugmentBaseDataVisitor.java:[line 847] > Bx Method org.apache.pig.pen.AugmentBaseDataVisitor.GetSmallerValue(Object) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead > Bx Method org.apache.pig.shock.SSHSocketImpl.getOption(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Bx Method org.apache.pig.tools.cmdline.CmdLineParser.getNextOpt() invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead > Bx Method org.apache.pig.tools.cmdline.CmdLineParser.getNextOpt() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead > Another occurrence at CmdLineParser.java:[line 126] > Bx Method org.apache.pig.tools.cmdline.CmdLineParser.registerOpt(char, String, CmdLineParser$ValueExpected) invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.