hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14533) Size of args cannot be less than zero in TraceAdmin#run as its linkedlist
Date Tue, 20 Jun 2017 13:15:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-14533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055726#comment-16055726
] 

Hudson commented on HADOOP-14533:
---------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11893 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/11893/])
HADOOP-14533. Size of args cannot be less than zero in TraceAdmin#run as (brahma: rev 2e9daa2e27536484846d9c5f020c6afaf27932ce)
* (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceAdmin.java
* (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tracing/TestTraceAdmin.java


> Size of args cannot be less than zero in TraceAdmin#run as its linkedlist
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-14533
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14533
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common, tracing
>    Affects Versions: 2.6.0
>            Reporter: Weisen Han
>            Assignee: Weisen Han
>            Priority: Trivial
>             Fix For: 2.9.0, 3.0.0-alpha4, 2.8.2
>
>         Attachments: HADOOP-14533-001.patch, HADOOP-14533-002.patch
>
>
> {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 wrong 
> {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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message