This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git


The following commit(s) were added to refs/heads/master by this push:
     new fc33b46d Better local name
fc33b46d is described below

commit fc33b46d21f07eba5f2ee05ad6236acb5494f773
Author: Gary David Gregory (Code signing key) <ggreg...@apache.org>
AuthorDate: Sat Oct 29 07:55:32 2022 -0400

    Better local name
---
 .../java/org/apache/bcel/verifier/statics/Pass2Verifier.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java 
b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
index b1f25747..ff899b05 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
@@ -1398,7 +1398,7 @@ public final class Pass2Verifier extends PassVerifier 
implements Constants {
      */
     private void finalMethodsAreNotOverridden() {
         try {
-            final Map<String, String> hashmap = new HashMap<>();
+            final Map<String, String> map = new HashMap<>();
             JavaClass jc = Repository.lookupClass(myOwner.getClassName());
 
             int supidx = -1;
@@ -1409,21 +1409,21 @@ public final class Pass2Verifier extends PassVerifier 
implements Constants {
                 for (final Method method : methods) {
                     final String nameAndSig = method.getName() + 
method.getSignature();
 
-                    if (hashmap.containsKey(nameAndSig)) {
+                    if (map.containsKey(nameAndSig)) {
                         if (method.isFinal()) {
                             if (!method.isPrivate()) {
-                                throw new ClassConstraintException("Method '" 
+ nameAndSig + "' in class '" + hashmap.get(nameAndSig)
+                                throw new ClassConstraintException("Method '" 
+ nameAndSig + "' in class '" + map.get(nameAndSig)
                                     + "' overrides the final (not-overridable) 
definition in class '" + jc.getClassName() + "'.");
                             }
-                            addMessage("Method '" + nameAndSig + "' in class 
'" + hashmap.get(nameAndSig)
+                            addMessage("Method '" + nameAndSig + "' in class 
'" + map.get(nameAndSig)
                                 + "' overrides the final (not-overridable) 
definition in class '" + jc.getClassName()
                                 + "'. This is okay, as the original definition 
was private; however this constraint leverage"
                                 + " was introduced by JLS 8.4.6 (not vmspec2) 
and the behavior of the Sun verifiers.");
                         } else if (!method.isStatic()) { // static methods 
don't inherit
-                            hashmap.put(nameAndSig, jc.getClassName());
+                            map.put(nameAndSig, jc.getClassName());
                         }
                     } else if (!method.isStatic()) { // static methods don't 
inherit
-                        hashmap.put(nameAndSig, jc.getClassName());
+                        map.put(nameAndSig, jc.getClassName());
                     }
                 }
 

Reply via email to