LUCENE-6193: Use ReflectiveOperationException to simplify catch clauses around reflection errors

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1653909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-01-22 15:21:27 +00:00
parent f5f2b28541
commit 77982fb4e3
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ public class LockStressTest {
// try to create a new instance
try {
return Class.forName(lockFactoryClassName).asSubclass(FSLockFactory.class).newInstance();
} catch (IllegalAccessException | InstantiationException | ClassCastException | ClassNotFoundException e) {
} catch (ReflectiveOperationException | ClassCastException e) {
// fall-through
}

View File

@ -565,7 +565,7 @@ public class JavascriptCompiler {
checkFunction(method, JavascriptCompiler.class.getClassLoader());
map.put(call, method);
}
} catch (NoSuchMethodException | ClassNotFoundException | IOException e) {
} catch (ReflectiveOperationException | IOException e) {
throw new Error("Cannot resolve function", e);
}
DEFAULT_FUNCTIONS = Collections.unmodifiableMap(map);