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

Reply via email to