Adam Heath wrote:
Raj Saini wrote:
Hi,

org.ofbiz.base.util.UtilObject#getObjectFromFactory class uses
*javax.imageio.spi.ServiceRegistry *class to load DelegatorFactory
implementation. ServiceRegistry class internally uses sun.misc.Service
class which is internal to sun and may not be part of other JDKs.

So?  ServiceRegistry is a public class, who cares how it works internally.
Try debugging the code in Eclipse and you wont be able to attach source code the source code internal classes is not part of the JDK. I had hard time resolving a class loading issues as I could not look into look into the source code in Eclipse debugger.
Starting with JDK 1.6, java.util.ServiceLoader class is provided to
replace the javax.imageio.spi.ServiceRegistry class and this class does
not depend on sun.misc.Service class. This is minor two line code change
and if community agree I can provide the patch.

The api isn't exactly compatible, but yes.
You are right they are not exactly compatible. I had to add one more line of code to replace the ServiceRegistry with ServiceLoader.

Thanks,

Raj

Reply via email to