sdedic commented on code in PR #7250:
URL: https://github.com/apache/netbeans/pull/7250#discussion_r1558967283
##########
ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEnginesProvider.java:
##########
@@ -60,7 +61,9 @@ public List<ScriptEngineFactory>
factories(ScriptEngineManager m) {
if (disable == null) {
enumerateLanguages(arr, m == null ? null : m.getBindings());
}
- } catch (IllegalStateException | LinkageError err) {
+ } catch (IllegalStateException | LinkageError |
ServiceConfigurationError err) {
+ // See NETBEANS #7245: First-time initialization with broken
implementation may produce ServiceConfigurationError, As this
+ // happens in class-initializer, subsequent attempts will throw
LinkageErrors.
Review Comment:
OK to more logging here. I do not quite understand the part with `disable`:
as far as I read the code, factories() can be called as part of
`Scripting.newBuilder().build()`, each call would produce an additional
exception (since Graal SDK is unable to enumerate its languages). The `disable`
aimed to prevent that and log Graal provider's failure just once (Graal's
`EngineProvider` is a singleton in Lookup, so the same instance is called all
the time).
Is it desirable to log each time Scripting.newBuilder().build() is called ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists