uschindler commented on a change in pull request #1837:
URL: https://github.com/apache/lucene-solr/pull/1837#discussion_r484223373
##########
File path:
lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java
##########
@@ -206,6 +247,12 @@ private Expression compileExpression(ClassLoader parent)
throws ParseException {
throw new IllegalStateException("An internal error occurred attempting
to compile the expression (" + sourceText + ").", exception);
}
}
+
Review comment:
I changed it. The way how to do this is correct as it only intends to
work around a problem of type inference in javac. For a methodhandle we know
for sure, which exceptions are thrown (it's different to core reflection, where
everything is wrapped in InvocationTargetException).
I moved the whole thing to a separate method and I catched and rethrow all
"known" Exceptions (IllegalAccessException, RuntimeException, Error), all
others can't happen, so it wraps with AssertionError.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]