try {
return complexCodecs.get(schema, () -> codec);
} catch (ExecutionException e) {
- throw Throwables.propagate(e.getCause());
+ final Throwable cause = e.getCause();
+ Throwables.throwIfUnchecked(cause);
+ throw new RuntimeException(e);
}
}
try {
return simpleCodecs.get(type, () -> codec);
} catch (ExecutionException e) {
- throw Throwables.propagate(e.getCause());
+ final Throwable cause = e.getCause();
+ Throwables.throwIfUnchecked(cause);
+ throw new RuntimeException(e);
}
}
}