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

Akira AJISAKA commented on HADOOP-11545:
----------------------------------------

{code}
+        if ((i+1) == args.length) {
+        printCredShellUsage();
+        return 0;
+        }
{code}
* Would you please add indents?
* We should return 1 since there is no argument for provider path.

{code}
-    public static final String USAGE = "list [-provider] [-help]";
+    public static final String USAGE = "list [-provider provider-path]";
{code}
Nice catch. Would you fix the {{USAGE}} of CreateCommand and DeleteCommand also?
In addition, I found {{hadoop credential create}} and {{hadoop credential 
delete}} commands cause {{ArrayIndexOutOfBoundsException}}. Would you fix them?

> ArrayIndexOutOfBoundsException is thrown with hadoop credential list -provider
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-11545
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11545
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.6.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HDFS-11545-001.patch
>
>
> Scenario:
> ========
> Please run the following command . dn't give the provider path.
> {noformat}
> [hdfs@host194 bin]$ ./hadoop credential list -provider
> java.lang.ArrayIndexOutOfBoundsException: 2
>         at 
> org.apache.hadoop.security.alias.CredentialShell.init(CredentialShell.java:117)
>         at 
> org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java:63)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>         at 
> org.apache.hadoop.security.alias.CredentialShell.main(CredentialShell.java:427)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to