I have been looking at the auth module with a view to increasing the
test coverage and making sure Harmony is compatible with the RI, and I
have a couple of questions I was hoping to get answers to.
1) Looking at javax.sercuity.auth.SubjectTest there is a field called
testing (in SecurityTest) that appears to be used to distinguish the
behaviour between Harmony and the RI. Is this approach to keep a common
set of tests for the RI and Harmony to right one for me to be following?
Here is an example from
javax.security.auth.SubjectTest.testSubject_3Set_InvalidSet()
try {
new Subject(false, hash, new HashSet(), new HashSet());
if (!testing) {
// possible to add 'null' principal via constructor
fail("No expected NullPointerException");
}
} catch (NullPointerException e) {
}
2) Are these sort of incompatibilities appropriate to remove from the
Harmony auth implementation? I think Harmony is attempting to be as
close as possible to the RI implementation and so I assume we should be
matching behaviour in this case.
Thanks for any insights.
Regards, Colin.