We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc14073 commit 5597e8bCopy full SHA for 5597e8b
modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java
@@ -201,6 +201,13 @@ protected MethodHandle computeValue(Class<?> receiverType) {
201
try {
202
return lookup(flavor, name, receiverType).asType(type);
203
} catch (Throwable t) {
204
+ // ClassValue.getFromHashMap wraps checked exceptions as Error, but
205
+ // we do not want to crash here because we could not process the type
206
+ // correctly as part of a script, so we instead unwrap the Error and
207
+ // rethrow the original exception
208
+ if (t instanceof Error && ((Error) t).getCause() instanceof Exception) {
209
+ t = (Exception) ((Error) t).getCause();
210
+ }
211
Def.rethrow(t);
212
throw new AssertionError();
213
}
0 commit comments