Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-1032

FINDBUGS: DM_STRING_CTOR: Method invokes inefficient new String(String) constructor

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Dm Method org.apache.pig.backend.executionengine.PigSlice.init(DataStorage) invokes toString() method on a String
      Dm org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.copyHadoopConfLocally(String) invokes inefficient new String(String) constructor
      Dm org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher.getFirstLineFromMessage(String) invokes inefficient new String(String) constructor
      Dm org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.BinaryComparisonOperator.initializeRefs() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ExpressionOperator.clone() invokes inefficient new String(String) constructor
      Dm org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(String) invokes inefficient new String(String) constructor
      Dm org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PONot.getNext(Boolean) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan.clone() invokes inefficient new String(String) constructor
      Dm new org.apache.pig.data.TimestampedTuple(String, String, int, SimpleDateFormat) invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.io.PigNullableWritable.toString() invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.logicalLayer.LOForEach.clone() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.impl.logicalLayer.LOGenerate.clone() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.impl.logicalLayer.LogicalPlan.clone() invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.logicalLayer.LOSort.clone() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.impl.logicalLayer.optimizer.ImplicitSplitInserter.transform(List) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
      Dm org.apache.pig.impl.logicalLayer.RemoveRedundantOperators.visit(LOProject) invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.logicalLayer.schema.Schema.getField(String) invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.logicalLayer.schema.Schema.reconcile(Schema) invokes inefficient new String(String) constructor
      Dm org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.insertCastForEachInBetweenIfNecessary(LogicalOperator, LogicalOperator, Schema) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead]
      Dm org.apache.pig.impl.util.SpillableMemoryManager.handleNotification(Notification, Object) forces garbage collection; extremely dubious except in benchmarking code
      Dm org.apache.pig.pen.AugmentBaseDataVisitor.GetLargerValue(Object) invokes inefficient new String(String) constructor
      Dm org.apache.pig.pen.AugmentBaseDataVisitor.GetSmallerValue(Object) invokes inefficient new String(String) constructor
      Dm org.apache.pig.tools.cmdline.CmdLineParser.getNextOpt() invokes inefficient new String(String) constructor
      Dm org.apache.pig.tools.parameters.PreprocessorContext.substitute(String) invokes inefficient new String(String) constructor

        Attachments

        1. PIG-1032.patch
          19 kB
          Olga Natkovich

          Activity

            People

            • Assignee:
              olgan Olga Natkovich
              Reporter:
              olgan Olga Natkovich
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: