Author: kkolinko Date: Fri Sep 12 23:07:49 2014 New Revision: 1624674 URL: http://svn.apache.org/r1624674 Log: Remove unused ConstantPool.constantToString methods. Found thanks to Cobertura coverage report.
It is merge of r1624569 from tomcat/trunk. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1624569 Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/ ------------------------------------------------------------------------------ Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624569 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=1624674&r1=1624673&r2=1624674&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java Fri Sep 12 23:07:49 2014 @@ -72,58 +72,6 @@ public class ConstantPool { /** - * Resolve constant to a string representation. - * - * @param c Constant to be printed - * @return String representation - */ - public String constantToString( Constant c ) throws ClassFormatException { - String str; - int i; - byte tag = c.getTag(); - switch (tag) { - case Constants.CONSTANT_Class: - i = ((ConstantClass) c).getNameIndex(); - c = getConstant(i, Constants.CONSTANT_Utf8); - str = Utility.compactClassName(((ConstantUtf8) c).getBytes()); - break; - case Constants.CONSTANT_Utf8: - str = ((ConstantUtf8) c).getBytes(); - break; - case Constants.CONSTANT_Double: - str = String.valueOf(((ConstantDouble) c).getBytes()); - break; - case Constants.CONSTANT_Float: - str = String.valueOf(((ConstantFloat) c).getBytes()); - break; - case Constants.CONSTANT_Long: - str = String.valueOf(((ConstantLong) c).getBytes()); - break; - case Constants.CONSTANT_Integer: - str = String.valueOf(((ConstantInteger) c).getBytes()); - break; - default: // Never reached - throw new RuntimeException("Unknown constant type " + tag); - } - return str; - } - - - /** - * Retrieve constant at `index' from constant pool and resolve it to - * a string representation. - * - * @param index of constant in constant pool - * @param tag expected type - * @return String representation - */ - public String constantToString( int index, byte tag ) throws ClassFormatException { - Constant c = getConstant(index, tag); - return constantToString(c); - } - - - /** * Get constant from constant pool. * * @param index Index in constant pool --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org