Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 5356 invoked from network); 26 Oct 2006 00:28:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 00:28:53 -0000 Received: (qmail 84951 invoked by uid 500); 24 Oct 2006 04:02:18 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 84920 invoked by uid 500); 24 Oct 2006 04:02:18 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 84908 invoked by uid 99); 24 Oct 2006 04:02:18 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Oct 2006 21:02:18 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Oct 2006 21:02:06 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C429D1A9846; Mon, 23 Oct 2006 21:01:31 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r467232 - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src: main/java/common/javax/security/auth/kerberos/ test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/ Date: Tue, 24 Oct 2006 04:01:31 -0000 To: harmony-commits@incubator.apache.org From: smishura@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061024040131.C429D1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: smishura Date: Mon Oct 23 21:01:30 2006 New Revision: 467232 URL: http://svn.apache.org/viewvc?view=rev&rev=467232 Log: Fix for KerberosPrincipal.toString() + minor cleanup Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/kerberos/KerberosPrincipal.java incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/KerberosPrincipalTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/kerberos/KerberosPrincipal.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/kerberos/KerberosPrincipal.java?view=diff&rev=467232&r1=467231&r2=467232 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/kerberos/KerberosPrincipal.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/kerberos/KerberosPrincipal.java Mon Oct 23 21:01:30 2006 @@ -59,9 +59,6 @@ // type of the principal private transient int type; - // TODO: It is gag. - // When KerberosPrincipla will be realize then this method - // should be delete or modify private void init(String name) { // FIXME: correctly implement parsing name according to RFC 1964 @@ -122,19 +119,12 @@ } public KerberosPrincipal(String name) { - // TODO: If principal name does't specify then a default realm - // should be read from krb.conf file else IllegalArgumentException - // should be throw init(name); type = KRB_NT_PRINCIPAL; } public KerberosPrincipal(String name, int type) { - // TODO: If principal name does't specify then a default realm - // should be read from krb.conf file else IllegalArgumentException - // should be throw init(name); - // TODO: it is gag if (type < 0 || type > KRB_NT_UID) { throw new IllegalArgumentException(Messages.getString("auth.25")); //$NON-NLS-1$ } @@ -174,7 +164,7 @@ @Override public String toString() { - return super.toString(); + return name; } private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/KerberosPrincipalTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/KerberosPrincipalTest.java?view=diff&rev=467232&r1=467231&r2=467232 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/KerberosPrincipalTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/KerberosPrincipalTest.java Mon Oct 23 21:01:30 2006 @@ -231,13 +231,12 @@ * @tests javax.security.auth.kerberos.KerberosPrincipal#toString() */ public void test_toString() { - // FIXME - // KerberosPrincipal principal = new - // KerberosPrincipal("name@apache.org"); - // - // assertEquals("javax.security.auth.kerberos.KerberosPrincipal@" - // + Integer.toHexString(principal.hashCode()), principal - // .toString()); + + String name = "name@apache.org"; + + KerberosPrincipal principal = new KerberosPrincipal(name); + + assertEquals(name, principal.toString()); } /**