Service Providers and versioning
jesse.glick at oracle.com
Wed Apr 18 09:29:09 PDT 2012
On 04/18/2012 11:50 AM, Sean Mullan wrote:
> the app module would be requesting a PKIX CertPathValidator service
OSGi supports service properties and capability attributes, which could handle such situations, but the specification is rather more complex than Jigsaw's current
proposal. Ditto the NetBeans module system's @NamedServiceDefinition/Lookups.forPath and provide/require tokens.
> that has been updated to support API changes to that SPI in JDK 8.
It does not seem that the signature of CertPathValidatorSpi changed in JDK 8. I guess what you are getting at is that an object can successfully implement this interface
at the Java language level yet not actually behave correctly (throw InvalidAlgorithmParameterException), which suggests a minor design flaw - lack of strong typing,
perhaps predating generics.
Anyway if a service written for an earlier version of Java has not been updated for incompatible SPI changes in JDK 8, then its containing module should not be resolvable
against JDK 8 to begin with - it should declare a conservative version range in its dependencies - and so there is no need for the app module to exclude it.
More information about the jigsaw-dev