Raj Saini wrote: > 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.
Huh? ServiceRegistry is not an internal class, it's a public class. There's nothing keeping ServiceLoader from being an *exact* copy of ServiceRegistry, with any and all same-class internal uses, including using some internal jvm-specific class. So, to change this class just because eclipse can't debug it because it's trying to read the source of some internal jvm class is the wrong reason.
