You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Wei-Chiu Chuang (JIRA)" <ji...@apache.org> on 2017/06/16 16:25:00 UTC
[jira] [Comment Edited] (HADOOP-14533) TraceAdmin#run, the size of
args cannot be less than zero,which is a linklist
[ https://issues.apache.org/jira/browse/HADOOP-14533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052093#comment-16052093 ]
Wei-Chiu Chuang edited comment on HADOOP-14533 at 6/16/17 4:24 PM:
-------------------------------------------------------------------
Good catch and thanks for posting the patch.
+1 pending Jenkins.
was (Author: jojochuang):
Good catch.
+1 pending Jenkins.
> 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
> Components: common, tracing
> Affects Versions: 3.0.0-alpha3
> Reporter: Weisen Han
> Assignee: Weisen Han
> Attachments: HADOOP-14533-001.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