You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/01/22 16:22:21 UTC
svn commit: r1653911 - in /lucene/dev/branches/branch_5x: ./ lucene/
lucene/core/ lucene/core/src/java/org/apache/lucene/store/LockStressTest.java
lucene/expressions/
lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java
Author: shalin
Date: Thu Jan 22 15:22:21 2015
New Revision: 1653911
URL: http://svn.apache.org/r1653911
Log:
LUCENE-6193: Use ReflectiveOperationException to simplify catch clauses around reflection errors
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/lucene/ (props changed)
lucene/dev/branches/branch_5x/lucene/core/ (props changed)
lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java
lucene/dev/branches/branch_5x/lucene/expressions/ (props changed)
lucene/dev/branches/branch_5x/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java
Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java?rev=1653911&r1=1653910&r2=1653911&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java Thu Jan 22 15:22:21 2015
@@ -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
}
Modified: lucene/dev/branches/branch_5x/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java?rev=1653911&r1=1653910&r2=1653911&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java (original)
+++ lucene/dev/branches/branch_5x/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java Thu Jan 22 15:22:21 2015
@@ -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);