Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1539

java.lang.VerifyError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.1-beta-1
    • parser
    • None

    Description

      my groovy script contains the following lines:
      if (true)
      {
      String = "myPrice"
      }

      When performing evaluate I would expect to get CompilationFailedException (because a value is being put into java.lang.String and not to a variable) but I get:

      java.lang.VerifyError: (class: Script1, method: run signature: ()Ljava/lang/Object Inconsistent stack height 2 != 0
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
      at java.lang.Class.getConstructor0(Class.java:1930)
      at java.lang.Class.newInstance0(Class.java:278)
      at java.lang.Class.newInstance(Class.java:261)
      at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:529)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:526)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:506)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:484)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:460)

      The interesting thing is when writing:
      String = "myPrice" (not inside a condition)
      then the evaluate succeeds and there is no error.

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              daniela daniela
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: