Patch for audi/midi services <was> Re: Audio/Midi services <was> Fwd: CR 7172234 Created, P2 java/jigsaw Lot of sound test failed due UnsatisfiedLinkError for com.sun.media.sound.* classes
Alan.Bateman at oracle.com
Wed May 30 08:52:32 PDT 2012
On 30/05/2012 15:41, Paul Sandoz wrote:
> It seems the pattern in jdk.depconfig is to always use optional, so i kept it like that, but since there are always services for the audi/midi cases, we don't need it to be optional, correct?
Most (perhaps all) usages of ServiceLoader in the JDK also have a
fallback to a default implementation when there aren't any service
providers (service implementations) installed. So assuming this is how
it specified then then "requires optional service ..." is right.
I'm not familiar with the JavaSound API. If the specification requires
that there be at least one service provider then the module declaration
should be "requires service ..." and the resolver will fail with " No
implementations of service .." if there aren't any implementations. As
we don't have the module-info source files checked in then it means
@Provider in the jdk.depconfig file. I don't think we have any cases
like that yet but it will require the META-INF/services to be present in
order for the class analyzer to generate the "provides service ..." in
the module declaration.
More information about the jigsaw-dev