Author: markt Date: Wed Sep 10 22:41:48 2014 New Revision: 1624162 URL: http://svn.apache.org/r1624162 Log: Simplify constructors. No functional change.
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java?rev=1624162&r1=1624161&r2=1624162&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java Wed Sep 10 22:41:48 2014 @@ -43,17 +43,8 @@ public final class ConstantClass extends * @throws IOException */ ConstantClass(DataInput file) throws IOException { - this(file.readUnsignedShort()); - } - - - /** - * @param name_index Name index in constant pool. Should refer to a - * ConstantUtf8. - */ - public ConstantClass(int name_index) { super(Constants.CONSTANT_Class); - this.name_index = name_index; + this.name_index = file.readUnsignedShort(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java?rev=1624162&r1=1624161&r2=1624162&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java Wed Sep 10 22:41:48 2014 @@ -37,22 +37,14 @@ public final class ConstantDouble extend /** - * @param bytes Data - */ - public ConstantDouble(double bytes) { - super(Constants.CONSTANT_Double); - this.bytes = bytes; - } - - - /** * Initialize instance from file data. * * @param file Input stream * @throws IOException */ ConstantDouble(DataInput file) throws IOException { - this(file.readDouble()); + super(Constants.CONSTANT_Double); + this.bytes = file.readDouble(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java?rev=1624162&r1=1624161&r2=1624162&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java Wed Sep 10 22:41:48 2014 @@ -37,22 +37,14 @@ public final class ConstantFloat extends /** - * @param bytes Data - */ - public ConstantFloat(float bytes) { - super(Constants.CONSTANT_Float); - this.bytes = bytes; - } - - - /** * Initialize instance from file data. * * @param file Input stream * @throws IOException */ ConstantFloat(DataInput file) throws IOException { - this(file.readFloat()); + super(Constants.CONSTANT_Float); + this.bytes = file.readFloat(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java?rev=1624162&r1=1624161&r2=1624162&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java Wed Sep 10 22:41:48 2014 @@ -37,22 +37,14 @@ public final class ConstantInteger exten /** - * @param bytes Data - */ - public ConstantInteger(int bytes) { - super(Constants.CONSTANT_Integer); - this.bytes = bytes; - } - - - /** * Initialize instance from file data. * * @param file Input stream * @throws IOException */ ConstantInteger(DataInput file) throws IOException { - this(file.readInt()); + super(Constants.CONSTANT_Integer); + this.bytes = file.readInt(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java?rev=1624162&r1=1624161&r2=1624162&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java Wed Sep 10 22:41:48 2014 @@ -37,22 +37,14 @@ public final class ConstantLong extends /** - * @param bytes Data - */ - public ConstantLong(long bytes) { - super(Constants.CONSTANT_Long); - this.bytes = bytes; - } - - - /** * Initialize instance from file data. * * @param file Input stream * @throws IOException */ ConstantLong(DataInput file) throws IOException { - this(file.readLong()); + super(Constants.CONSTANT_Long); + this.bytes = file.readLong(); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org