jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-2088

Inconsistent stack height when using super inside a conditional

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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

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])

{ response.sendRedirect(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!

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Daniel Lopez added a comment - 29/Aug/07 2:47 AM

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!

Show
Daniel Lopez added a comment - 29/Aug/07 2:47 AM 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!
Hide
Permalink
Daniel Lopez added a comment - 29/Aug/07 2:47 AM

Reopening it to set fix version

Show
Daniel Lopez added a comment - 29/Aug/07 2:47 AM Reopening it to set fix version
Hide
Permalink
Daniel Lopez added a comment - 29/Aug/07 2:48 AM

Updated fixed version

Show
Daniel Lopez added a comment - 29/Aug/07 2:48 AM Updated fixed version

People

  • Assignee:
    Unassigned
    Reporter:
    Daniel Lopez
Vote (0)
Watch (0)

Dates

  • Created:
    29/Aug/07 1:59 AM
    Updated:
    30/Nov/07 10:13 PM
    Resolved:
    29/Aug/07 2:48 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.