Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C093CD74B for ; Wed, 13 Mar 2013 15:27:53 +0000 (UTC) Received: (qmail 80979 invoked by uid 500); 13 Mar 2013 15:27:53 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 80945 invoked by uid 500); 13 Mar 2013 15:27:53 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 80937 invoked by uid 99); 13 Mar 2013 15:27:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Mar 2013 15:27:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Mar 2013 15:27:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D898423889D7; Wed, 13 Mar 2013 15:27:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1456002 - in /accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler: Authenticator.java ZKAuthenticator.java Date: Wed, 13 Mar 2013 15:27:14 -0000 To: commits@accumulo.apache.org From: vines@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130313152714.D898423889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vines Date: Wed Mar 13 15:27:14 2013 New Revision: 1456002 URL: http://svn.apache.org/r1456002 Log: ACCUMULO-1159 - Fixes exception on all token prompts Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/Authenticator.java accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/ZKAuthenticator.java Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/Authenticator.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/Authenticator.java?rev=1456002&r1=1456001&r2=1456002&view=diff ============================================================================== --- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/Authenticator.java (original) +++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/Authenticator.java Wed Mar 13 15:27:14 2013 @@ -28,7 +28,7 @@ public interface Authenticator { public List> getProperties(); - public class AuthProperty { + public class AuthProperty implements Comparable{ private String key, description; private boolean masked; @@ -53,5 +53,20 @@ public interface Authenticator { public boolean getMask() { return this.masked; } + + public int hashCode() { + return key.hashCode(); + } + + public boolean equals(Object o) { + if (o instanceof AuthProperty) + return ((AuthProperty) o).key.equals(key); + return false; + } + + @Override + public int compareTo(AuthProperty o) { + return key.compareTo(o.key); + } } } Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/ZKAuthenticator.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/ZKAuthenticator.java?rev=1456002&r1=1456001&r2=1456002&view=diff ============================================================================== --- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/ZKAuthenticator.java (original) +++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/security/handler/ZKAuthenticator.java Wed Mar 13 15:27:14 2013 @@ -16,11 +16,11 @@ */ package org.apache.accumulo.core.security.handler; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Properties; import java.util.Set; -import java.util.TreeSet; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode; @@ -45,7 +45,7 @@ public class ZKAuthenticator implements @Override public List> getProperties() { List> toRet = new LinkedList>(); - Set internal = new TreeSet(); + Set internal = new LinkedHashSet(); internal.add(new AuthProperty("password", "the password for the principal", true)); internal.add(new AuthProperty("principal", "option field to provide the principal, mostly used for better debug statements", false)); toRet.add(internal);