You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/09/12 15:23:42 UTC
svn commit: r1624542 -
/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org