This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 32de88082e74c38dd56f7fff8f9b9c7af1d23e97 Author: remm <r...@apache.org> AuthorDate: Mon Apr 19 16:49:14 2021 +0200 Fix typos and consistent naming --- java/org/apache/tomcat/util/bcel/classfile/ClassParser.java | 10 +++++----- java/org/apache/tomcat/util/bcel/classfile/JavaClass.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java b/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java index 89dab31..af24856 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java +++ b/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java @@ -49,7 +49,7 @@ public final class ClassParser { private String[] interfaceNames; // Names of implemented interfaces private ConstantPool constantPool; // collection of constants private Annotations runtimeVisibleAnnotations; // "RuntimeVisibleAnnotations" attribute defined in the class - private List<Annotations> runtimeVisibleMethodOfFieldAnnotations; // "RuntimeVisibleAnnotations" attribute defined elsewhere + private List<Annotations> runtimeVisibleFieldOrMethodAnnotations; // "RuntimeVisibleAnnotations" attribute defined elsewhere private static final int BUFSIZE = 8192; private static final String[] INTERFACES_EMPTY_ARRAY = new String[0]; @@ -99,7 +99,7 @@ public final class ClassParser { // Return the information we have gathered in a new object return new JavaClass(class_name, superclassName, accessFlags, constantPool, interfaceNames, - runtimeVisibleAnnotations, runtimeVisibleMethodOfFieldAnnotations); + runtimeVisibleAnnotations, runtimeVisibleFieldOrMethodAnnotations); } @@ -126,10 +126,10 @@ public final class ClassParser { if (name.equals("RuntimeVisibleAnnotations")) { if (fieldOrMethod) { Annotations fieldOrMethodAnnotations = new Annotations(dataInputStream, constantPool); - if (runtimeVisibleMethodOfFieldAnnotations == null) { - runtimeVisibleMethodOfFieldAnnotations = new ArrayList<>(); + if (runtimeVisibleFieldOrMethodAnnotations == null) { + runtimeVisibleFieldOrMethodAnnotations = new ArrayList<>(); } - runtimeVisibleMethodOfFieldAnnotations.add(fieldOrMethodAnnotations); + runtimeVisibleFieldOrMethodAnnotations.add(fieldOrMethodAnnotations); } else { if (runtimeVisibleAnnotations != null) { throw new ClassFormatException( diff --git a/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java b/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java index 14ef3a1..819175a 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java +++ b/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java @@ -35,7 +35,7 @@ public class JavaClass { private final String superclassName; private final String[] interfaceNames; private final Annotations runtimeVisibleAnnotations; // "RuntimeVisibleAnnotations" attribute defined in the class - private final List<Annotations> runtimeVisibleMethodOfFieldAnnotations; // "RuntimeVisibleAnnotations" attribute defined elsewhere + private final List<Annotations> runtimeVisibleFieldOrMethodAnnotations; // "RuntimeVisibleAnnotations" attribute defined elsewhere /** * Constructor gets all contents as arguments. @@ -46,14 +46,14 @@ public class JavaClass { * @param constant_pool Array of constants * @param interfaceNames Implemented interfaces * @param runtimeVisibleAnnotations "RuntimeVisibleAnnotations" attribute defined on the Class, or null - * @param runtimeVisibleMethodOfFieldAnnotations "RuntimeVisibleAnnotations" attribute defined on the fields or methids, or null + * @param runtimeVisibleFieldOrMethodAnnotations "RuntimeVisibleAnnotations" attribute defined on the fields or methods, or null */ JavaClass(final String className, final String superclassName, final int accessFlags, final ConstantPool constant_pool, final String[] interfaceNames, - final Annotations runtimeVisibleAnnotations, final List<Annotations> runtimeVisibleMethodOfFieldAnnotations) { + final Annotations runtimeVisibleAnnotations, final List<Annotations> runtimeVisibleFieldOrMethodAnnotations) { this.accessFlags = accessFlags; this.runtimeVisibleAnnotations = runtimeVisibleAnnotations; - this.runtimeVisibleMethodOfFieldAnnotations = runtimeVisibleMethodOfFieldAnnotations; + this.runtimeVisibleFieldOrMethodAnnotations = runtimeVisibleFieldOrMethodAnnotations; this.className = className; this.superclassName = superclassName; this.interfaceNames = interfaceNames; @@ -92,8 +92,8 @@ public class JavaClass { annotationEntries.put(annotationEntry.getAnnotationType(), annotationEntry); } } - if (runtimeVisibleMethodOfFieldAnnotations != null) { - for (Annotations annotations : runtimeVisibleMethodOfFieldAnnotations.toArray(new Annotations[0])) { + if (runtimeVisibleFieldOrMethodAnnotations != null) { + for (Annotations annotations : runtimeVisibleFieldOrMethodAnnotations.toArray(new Annotations[0])) { for (AnnotationEntry annotationEntry : annotations.getAnnotationEntries()) { annotationEntries.putIfAbsent(annotationEntry.getAnnotationType(), annotationEntry); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org