On 06/10/2012 13:42, Remi Forax wrote:

Thanks Alan,
I'm fine with methods loadProviderAsService and loadProviderFromProperty, but I think you can remove loadProvider
because PROVIDER can be initialized in a static block.

private static final XmlPropertiesProvider PROVIDER;
static {
   PROVIDER = AccessController.doPrivileged(
       new PrivilegedAction<XmlPropertiesProvider>() {
        ...
       }});
}
Yes, it could be done this way too but I actually prefer the way it is now (I realize this is somewhat subjective).

-Alan.

Reply via email to