Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/154#discussion_r79623802
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java 
---
    @@ -142,11 +158,22 @@ public AuthenticationToken getToken() {
           }
         }
     
    -    if (securePassword != null)
    -      return new PasswordToken(securePassword.value);
    -
    -    if (password != null)
    -      return new PasswordToken(password.value);
    +    // other token types should have resolved by this point, so return 
PasswordToken
    +    Password pass = null;
    +    if (securePassword != null) {
    +      pass = securePassword;
    +    } else if (password != null) {
    +      pass = password;
    +    } else {
    +      try {
    +        pass = Password.promptUser();
    +      } catch (IOException e) {
    +        throw new RuntimeException(e);
    +      }
    +    }
    +    if (pass != null) {
    --- End diff --
    
    That's a weird test. I feel like the `fail()` is the expected execution 
path (e.g. it's asserting that `getPrincipal()` throw an exception) and the 
`assertNull()` is an afterthought?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to