[jira] [Created] (HADOOP-14533) TraceAdmin#run, the size of args cannot be less than zero,which is a linklist

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (HADOOP-14533) TraceAdmin#run, the size of args cannot be less than zero,which is a linklist

JIRA jira@apache.org
Weisen Han created HADOOP-14533:
-----------------------------------

             Summary: TraceAdmin#run, the size of args cannot be less than zero,which is a linklist
                 Key: HADOOP-14533
                 URL: https://issues.apache.org/jira/browse/HADOOP-14533
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 3.0.0-alpha3
            Reporter: Weisen Han


{code}
  @Override
  public int run(String argv[]) throws Exception {
      LinkedList<String> args = new LinkedList<String>();
      ……
         if (args.size() < 0) {
      System.err.println("You must specify an operation.");
      return 1;
    }
……
}
{code}
From the code above, the {{args}}  is a linklist obejct, so it cannot be less than zero.meaning that code below is redundant
{code}
         if (args.size() < 0) {
      System.err.println("You must specify an operation.");
      return 1;
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]