Technical review was: [PATCH] Enhance ServiceLoader to understand factory methods
jaroslav.tulach at sun.com
Tue Oct 21 13:34:47 UTC 2008
OK, so now, after Mark's reply, we know that it is possible to include such
little, compatible extensions of an existing APIs into the Maintenance JSR.
Good. Now please tell me, what shall I do to make it happen?
Will Mark or someone else from core-libs@ do a technical review of my patch?
 I'd like my patch to not be dropped just because, we wait and wait and
wait and then it will be "too late".
Jaroslav Tulach wrote:
> Proposal: Enhance ServiceLoader to understand factory methods
> Justification: A lot of our services in NetBeans are final classes. Still,
> would like to use the META-INF/services registration to register their
> providers. Currently this does not work, we either need to unfinalize the
> classes (which restricts future evolution options) or use different ways
> of registering the providers. We propose simple and backward compatible
> extension to current ServiceLoader registration scheme. If accepted,
> NetBeans'll eliminate our non-standard registration methods, while keeping
> benefits of final classes. Moreover the same techniques will be available
> to any JavaSE project.
> Risks: API change includes simple, compatible extension. New code is able
> to accept old registrations. Old code (JDK6) will generate
> ServiceConfigurationError in case of seeing new registration, however.
> Test: I have found tests in test/java/util/ServiceLoader/ directory and
> I've modified them to verify also our new usecase. All of them are
> passing, if I run them by running ./basic.sh script - I am not sure if
> that is the right way of running your tests.
> I am attaching my current patch. Let me know what shall I change to allow
> to be integrated to OpenJDK7. Thanks a lot.
> Jaroslav Tulach
> NetBeans Platform Architect
More information about the core-libs-dev