Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 28868 invoked from network); 9 Sep 2010 14:58:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 14:58:59 -0000 Received: (qmail 12030 invoked by uid 500); 9 Sep 2010 14:58:59 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 11773 invoked by uid 500); 9 Sep 2010 14:58:57 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 11757 invoked by uid 99); 9 Sep 2010 14:58:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 14:58:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 14:58:55 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o89EwZq2020944 for ; Thu, 9 Sep 2010 14:58:35 GMT Message-ID: <29056744.97121284044315503.JavaMail.jira@thor> Date: Thu, 9 Sep 2010 10:58:35 -0400 (EDT) From: "Colin Thorne (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6645) [classlib][auth]Tidy up and tests of javax.secrity.auth.Subject.java In-Reply-To: <22361584.97101284044315044.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colin Thorne updated HARMONY-6645: ---------------------------------- Attachment: auth-Subject.patch Patch for trunk\classlib\modules\auth changes. > [classlib][auth]Tidy up and tests of javax.secrity.auth.Subject.java > -------------------------------------------------------------------- > > Key: HARMONY-6645 > URL: https://issues.apache.org/jira/browse/HARMONY-6645 > Project: Harmony > Issue Type: Improvement > Components: Classlib > Affects Versions: 6.0M2, 5.0M14 > Environment: All > Reporter: Colin Thorne > Attachments: auth-Subject.patch > > > I have investigated Subject.java to understand the differences in behaviour between the RI and Harmony. There are several differences noted in the test files SubjectTest.java and SecurityTest.java which I have investigated and then mades some changes. > I will attach a patch with my changes which can be divided into the following parts: > - Change to Subject.toString(): Changed to match RI so that I could write a testcase (there was a FIXME in the code). > - When invalid Principal objects are put into the Principal set, I have changed the exception from IllegalArgumentException to SecurityException. The message text is unchanged (for example, "Element is not instance of java.security.Principal". My reasoning is that applications would be expecting the SecurityException in this case although it could be argued that an IllegalArgumentException is more suitable for adding to a Set. I have updated the relevant tests. > - I have added comments to all the tests which show different behaviour on the RI so that it is easy to understand which tests are different and why. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.