On 28/12/2012 17:39, Sean Mullan wrote:
As part of the effort to prepare the platform for modules (see
http://openjdk.java.net/jeps/162) we need to remove or deprecate
undesirable dependencies. One of these is the dependency:
sun.security.provider.PolicyFile ->
com.sun.security.auth.PrincipalComparator
which is problematic since the com.sun.security.auth package is not
intended to be part of the base module.
The solution is to add an implies method to the
java.security.Principal interface. Existing PrincipalComparator
implementations must also implement Principal if they are to be used
by the default "JavaPolicy" Policy implementation. This change will
allow us to remove the dependency on the PrincipalComparator class and
preserve compatibility.
Since java.security.Principal is an interface, this change requires
the new default method feature of lambda.
webrev: http://cr.openjdk.java.net/~mullan/webrevs/7019834/webrev.00/
Thanks,
Sean
This looks very good to me and good to have this dependency issue
finally resolved.
Minor comment is that it might be better to use {@code Principal} rather
than "principal" in the method description.
In PolicyFile it looks like there are 8 or so imports of permission
classes commented out - should this be removed?
-Alan