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 16:07:53 UTC

svn commit: r1624552 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ElementValue.java

Author: kkolinko
Date: Fri Sep 12 14:07:53 2014
New Revision: 1624552

URL: http://svn.apache.org/r1624552
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).

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/ElementValue.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1624542

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624542

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java?rev=1624552&r1=1624551&r2=1624552&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java Fri Sep 12 14:07:53 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