diff --git a/lucene/src/java/org/apache/lucene/util/VirtualMethod.java b/lucene/src/java/org/apache/lucene/util/VirtualMethod.java index 6a1b4e1a447..11937db0542 100644 --- a/lucene/src/java/org/apache/lucene/util/VirtualMethod.java +++ b/lucene/src/java/org/apache/lucene/util/VirtualMethod.java @@ -83,8 +83,8 @@ public final class VirtualMethod { "VirtualMethod instances must be singletons and therefore " + "assigned to static final members in the same class, they use as baseClass ctor param." ); - } catch (NoSuchMethodException name) { - throw new IllegalArgumentException(baseClass.getName() + " has no such method: "+name.getMessage()); + } catch (NoSuchMethodException nsme) { + throw new IllegalArgumentException(baseClass.getName() + " has no such method: "+nsme.getMessage()); } }