Author: kkolinko Date: Fri Sep 12 13:23:42 2014 New Revision: 1624542 URL: http://svn.apache.org/r1624542 Log: Use ClassFormatException in ElementValue.readElementValue() as this behaviour is driven by user-provided data, instead of logic errors in the code (as is the case for remaining RuntimeExceptions in BCEL). This review was inspired by r1624396.
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java 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=1624542&r1=1624541&r2=1624542&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 Fri Sep 12 13:23:42 2014 @@ -117,7 +117,7 @@ public abstract class ElementValue } return new ArrayElementValue(ARRAY, evalues, cpool); default: - throw new RuntimeException( + throw new ClassFormatException( "Unexpected element value kind in annotation: " + type); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org