harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Thorne (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6645) [classlib][auth]Tidy up and tests of javax.security.auth.Subject.java
Date Thu, 09 Sep 2010 16:51:32 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Colin Thorne updated HARMONY-6645:

    Attachment: auth-Subject2.patch

I have added a replacement patch that also addresses the two FIXME comments in the Subject

- I refactored checkState to inline the test into the two places in the code that are used.
This seemed to be more obvious when understanding the code than leaving the checkState method.
- The getClass() FIXME "must have permissions for requested priv. credentials" seems to be
superfluous because there are test cases in SubjectTest.testGetClass which test that the correct
behaviour is exhibited when private credential permission is denied.

> [classlib][auth]Tidy up and tests of javax.security.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, auth-Subject2.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.

View raw message