* File: DynamicLinkerFactory:

+ String autoLoaderClassName = "unknown";
+ final GuardingDynamicLinkerExporter autoLoader = it.next();
+ try {
+ autoLoaderClassName = autoLoader.getClass().getName();
+ final String knownAutoLoaderClassName = autoLoaderClassName;

Do we need 2 variables to store auto loaded class name? autoLoaderClassName seems to be used only to initialize second (final) variable. Am I missing something?

* If a particular linker exporter jar does not have necessary permission to export, it appears that it can still do "deniel of service". i.e., SecurityException will force for loop in "discoverAutoLoadLinkers"method to exit early and prevent other legitimate 'linker exporters" from working.

-Sundar

On 10/19/2015 9:51 PM, Attila Szegedi wrote:
Please review JDK-8139895 "Introduce GuardingDynamicLinkerExporter" at 
<http://cr.openjdk.java.net/~attila/8139895/webrev.jdk9> for 
<https://bugs.openjdk.java.net/browse/JDK-8139895>

Remarks:
- DynamicLinkerFactory now loads the linkers in a doPrivileged block so that 
the lack of “dynalink.exportLinkersAutomatically” permission in the caller 
doesn’t preclude it from loading trusted linkers. This is consistent with how 
e.g. ScriptEngineManager uses ServiceLoader.
- DynamicLinkerFactory now has a new method "List<ServiceConfigurationError> 
getAutoLoadingErrors()” so that the user can inspect if some automatically loaded linkers 
failed to load. This is especially significant as the GuardingDynamicLinkerExporter can 
have some failure modes: it can lack the dynalink.exportLinkersAutomatically permission, 
it can return null from get() or any element of the returned element might be null

Thanks,
   Attila.

Reply via email to