Author: markt Date: Mon Aug 22 10:02:53 2016 New Revision: 1757132 URL: http://svn.apache.org/viewvc?rev=1757132&view=rev Log: Updating Tomcat's copy of BCEL as far as r1750000 (more to come)
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/ (props changed) tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java Propchange: tomcat/trunk/java/org/apache/tomcat/util/bcel/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 22 10:02:53 2016 @@ -1,3 +1,3 @@ -/commons/proper/bcel/trunk/src/main/java/org/apache/bcel:1149512-1694910,1747273-1748500 +/commons/proper/bcel/trunk/src/main/java/org/apache/bcel:1149512-1694910,1747273-1750000 /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6:1694911-1747272 /jakarta/bcel/trunk/src/main/java/org/apache/bcel:886845-1149511 Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java Mon Aug 22 10:02:53 2016 @@ -35,7 +35,7 @@ public class ArrayElementValue extends E @Override public String stringifyValue() { - StringBuilder sb = new StringBuilder(); + final StringBuilder sb = new StringBuilder(); sb.append("["); for (int i = 0; i < evalues.length; i++) { Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java Mon Aug 22 10:02:53 2016 @@ -35,7 +35,7 @@ public class ClassElementValue extends E @Override public String stringifyValue() { - ConstantUtf8 cu8 = (ConstantUtf8) super.getConstantPool().getConstant(idx, + final ConstantUtf8 cu8 = (ConstantUtf8) super.getConstantPool().getConstant(idx, Const.CONSTANT_Utf8); return cu8.getBytes(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java Mon Aug 22 10:02:53 2016 @@ -106,7 +106,7 @@ public final class ClassParser { * @throws ClassFormatException */ private void readAttributes() throws IOException, ClassFormatException { - int attributes_count = dataInputStream.readUnsignedShort(); + final int attributes_count = dataInputStream.readUnsignedShort(); for (int i = 0; i < attributes_count; i++) { ConstantUtf8 c; String name; @@ -181,7 +181,7 @@ public final class ClassParser { * @throws ClassFormatException */ private void readFields() throws IOException, ClassFormatException { - int fields_count = dataInputStream.readUnsignedShort(); + final int fields_count = dataInputStream.readUnsignedShort(); for (int i = 0; i < fields_count; i++) { Utility.swallowFieldOrMethod(dataInputStream); } @@ -208,7 +208,7 @@ public final class ClassParser { * @throws ClassFormatException */ private void readInterfaces() throws IOException, ClassFormatException { - int interfaces_count = dataInputStream.readUnsignedShort(); + final int interfaces_count = dataInputStream.readUnsignedShort(); if (interfaces_count > 0) { interface_names = new String[interfaces_count]; for (int i = 0; i < interfaces_count; i++) { @@ -227,7 +227,7 @@ public final class ClassParser { * @throws ClassFormatException */ private void readMethods() throws IOException, ClassFormatException { - int methods_count = dataInputStream.readUnsignedShort(); + final int methods_count = dataInputStream.readUnsignedShort(); for (int i = 0; i < methods_count; i++) { Utility.swallowFieldOrMethod(dataInputStream); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java Mon Aug 22 10:02:53 2016 @@ -64,7 +64,7 @@ public abstract class Constant { */ static Constant readConstant(final DataInput input) throws IOException, ClassFormatException { - byte b = input.readByte(); // Read tag byte + final byte b = input.readByte(); // Read tag byte int skipSize; switch (b) { case Const.CONSTANT_Class: Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java Mon Aug 22 10:02:53 2016 @@ -45,7 +45,7 @@ public class ConstantPool { * @throws ClassFormatException */ ConstantPool(final DataInput input) throws IOException, ClassFormatException { - int constant_pool_count = input.readUnsignedShort(); + final int constant_pool_count = input.readUnsignedShort(); constant_pool = new Constant[constant_pool_count]; /* constant_pool[0] is unused by the compiler and may be used freely * by the implementation. Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java Mon Aug 22 10:02:53 2016 @@ -49,7 +49,7 @@ public abstract class ElementValue public static ElementValue readElementValue(final DataInput input, final ConstantPool cpool) throws IOException { - byte type = input.readByte(); + final byte type = input.readByte(); switch (type) { case PRIMITIVE_BYTE: @@ -75,8 +75,8 @@ public abstract class ElementValue return new AnnotationElementValue(ANNOTATION, new AnnotationEntry(input, cpool), cpool); case ARRAY: - int numArrayVals = input.readUnsignedShort(); - ElementValue[] evalues = new ElementValue[numArrayVals]; + final int numArrayVals = input.readUnsignedShort(); + final ElementValue[] evalues = new ElementValue[numArrayVals]; for (int j = 0; j < numArrayVals; j++) { evalues[j] = ElementValue.readElementValue(input, cpool); Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java Mon Aug 22 10:02:53 2016 @@ -43,7 +43,7 @@ public class ElementValuePair public String getNameString() { - ConstantUtf8 c = (ConstantUtf8) constantPool.getConstant( + final ConstantUtf8 c = (ConstantUtf8) constantPool.getConstant( elementNameIndex, Const.CONSTANT_Utf8); return c.getBytes(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java Mon Aug 22 10:02:53 2016 @@ -34,7 +34,7 @@ public class EnumElementValue extends El @Override public String stringifyValue() { - ConstantUtf8 cu8 = (ConstantUtf8) super.getConstantPool().getConstant(valueIdx, + final ConstantUtf8 cu8 = (ConstantUtf8) super.getConstantPool().getConstant(valueIdx, Const.CONSTANT_Utf8); return cu8.getBytes(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java?rev=1757132&r1=1757131&r2=1757132&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java Mon Aug 22 10:02:53 2016 @@ -41,47 +41,47 @@ public class SimpleElementValue extends @Override public String stringifyValue() { - ConstantPool cpool = super.getConstantPool(); + final ConstantPool cpool = super.getConstantPool(); final int _type = super.getType(); switch (_type) { case PRIMITIVE_INT: - ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), + final ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: - ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), + final ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Const.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: - ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), + final ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Const.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: - ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), + final ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Const.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: - ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), + final ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: - ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), + final ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: - ConstantInteger ch = (ConstantInteger) cpool.getConstant( + final ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Const.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: - ConstantInteger bo = (ConstantInteger) cpool.getConstant( + final ConstantInteger bo = (ConstantInteger) cpool.getConstant( getIndex(), Const.CONSTANT_Integer); if (bo.getBytes() == 0) { return "false"; } return "true"; case STRING: - ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(getIndex(), + final ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(getIndex(), Const.CONSTANT_Utf8); return cu8.getBytes(); default: --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org