Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1-beta-2
-
None
-
None
-
java.version: 1.6.0_02
os.name: Windows XP
Description
When having a class like this:
************************************************************************************************
public class RedirectOperation extends XMLOperation
{
protected void _processXML(
StreamSource xmlSource,
XMLOperationDescriptor theXMLOperationDescriptor,
HttpServletRequest request,
HttpServletResponse response,
ServletContext theContext,
Hashtable theParameters,
Hashtable theEnvironment)
throws TransformerException, IOException, OperationException
{
def doc = new XmlParser().parse(xmlSource.getInputStream())
xmlSource.getInputStream().reset()
def redirectURL = doc.REDIRECT_URL.'@Url'
if(redirectURL[0])
else
{ super._processXML( xmlSource, theXMLOperationDescriptor,request,response,theContext,theParameters,theEnvironment); } }
}
************************************************************************************************
Class is compiled and the .class file used. Executing the method on an instance raises this error:
java.lang.VerifyError: (class: es/uib/test/RedirectOperation, method: _processXML
signature:
(Ljavax/xml/transform/stream/StreamSource;Lorg/leaf/XMLOperationDescriptor;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;Ljava/util/Hashtable;Ljava/util/Hashtable;)V)
Inconsistent stack height 1 != 0
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
...
If, for example, one removes the "else" clause and places a return at the end of the if clause, then everything works as expected.
Verified with Groovy 1.0 and Groovy 1.1b2
Groovy script compiled through the Eclipse plugin
S!