Re: JSR311: API uses Sun classes

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 15 Oct 2007 13:15:53 +0200

Hi Felix,

Felix Meschberger wrote:
> Hi all,
> Being distracted from this JSR for way too long, I only just now really
> started looking at it. While playing around, I stumbled upon two places
> using Sun classes:
> * ApiMessages uses com.sun.localization.*
> * ProviderFactory uses sun.misc.Service
> I always understood, that sun.* (and presumably com.sun.*) packages are
> private to the Sun Java implementation and thus should not be used [1].
> I am somewhat weary of this when thinking of using the API in a non-Sun
> VM or in an environment such as an OSGi framework, which possibly does
> not provides these packages.
> Is there any chance, that these references may be removed ?

Yes, we plan to remove them.

The dependence on com.sun.localization.* is a temporary convenience for
l10n (the dependent classes are bundled with 311 jar as of version 0.3).

The dependence on sun.misc.Service is again temporary convenience but
requires a little more thought to remove that the former. We will have
to push some equivalent private/package-scoped classes into the 311 jar
to access META-INF/services information.

> Should I
> post an issue ?

Please, that would be helpful.


| ? + ? = To question
    Paul Sandoz