groovy
  1. groovy
  2. GROOVY-1586

verify error / NPE with & operator

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.0-RC-1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      C:\>groovy -v
      Groovy Version: 1.0-RC-01 JVM: 1.6.0-b105
    • Number of attachments :
      0

      Description

      C:\>groovy -e "i=0;j=1;((i = 1) == 3) & ((j = 2) == 2)"
      Caught: java.lang.VerifyError: (class: script_from_command_line, method: run signature: ()Ljava/lang/Object Expecting to find object/array on stack

      With jdk 150_09 and 142_09 the same one liner seems to cause a null pointer exception.

        Issue Links

          Activity

          Hide
          Paul King added a comment -

          > groovy --version
          Groovy Version: 1.0-RC-02-SNAPSHOT JVM: 1.4.2_12-b03
          > groovy -e "i=0;j=1;((i = 1) == 3) & ((j = 2) == 2)"
          2 was unexpected at this time.

          Show
          Paul King added a comment - > groovy --version Groovy Version: 1.0-RC-02-SNAPSHOT JVM: 1.4.2_12-b03 > groovy -e "i=0;j=1;((i = 1) == 3) & ((j = 2) == 2)" 2 was unexpected at this time.
          Hide
          Antti Karanta added a comment -

          Hmm, that's really strange.

          I just tried again and realized that this problem only manifests itself w/ the native launcher when launching from the command line. The .bat launcher acts as you showed.

          So, I suspected it was something w/ the native launcher. Strange enough, it looks that the params are passed to the groovy java side without problems, so I don't know what is causing it.

          However, when one runs

          i=0;j=1;((i = 1) == 3) & ((j = 2) == 2)
          go

          in the groovysh groovy shell, the problem again manifests itself. And groovy shell doesn't have anything to do w/ the native launcher.

          So, could you try to run the above snippet in groovysh? This would help to define whether this is just something in my environment.

          Show
          Antti Karanta added a comment - Hmm, that's really strange. I just tried again and realized that this problem only manifests itself w/ the native launcher when launching from the command line. The .bat launcher acts as you showed. So, I suspected it was something w/ the native launcher. Strange enough, it looks that the params are passed to the groovy java side without problems, so I don't know what is causing it. However, when one runs i=0;j=1;((i = 1) == 3) & ((j = 2) == 2) go in the groovysh groovy shell, the problem again manifests itself. And groovy shell doesn't have anything to do w/ the native launcher. So, could you try to run the above snippet in groovysh? This would help to define whether this is just something in my environment.
          Hide
          blackdrag blackdrag added a comment -

          closed as duplicate, see linked issue

          Show
          blackdrag blackdrag added a comment - closed as duplicate, see linked issue

            People

            • Assignee:
              blackdrag blackdrag
              Reporter:
              Antti Karanta
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: