Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1-beta-2
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Environment:java.version: 1.6.0_02
os.name: Windows XP
-
Number of attachments :
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!
Eclipse plugin is not updated to Groovy 1.1b2 but if you compile the file manually with Groovyc, it works. So the problem seems to have been in the compiler and is now fixed.
Compiling it with the Eclipse plugin (it uses Groovy1.0) and running it with Groovy 1.1b2 does not work.
S!