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

IndyInterface.selectMethod() fails with IllegalArgumentException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
    • Environment:
      JDK 1.7.0_51 x64, Windows 7, groovy-all-2.2.2-indy.jar, commons-cli-1.2.jar

      Description

      We are using groovy.util.CliBuilder with Groovy 2.2.2. I switched to the Indy version because code coverage measurements with Cobertura work much better that way. Unfortunately there seems to be an issue when a method from commons-cli needs to be resolved: HelpFormatter.printHelp(PrintWriter, int, String, String, Options, int, int, String). This does not happen with the non-indy version of Groovy.

      Caused by: java.lang.IllegalArgumentException: target and fallback types must match: (Object,Object,Object,Object,Object,Object,Object,Object,Object)Object != (HelpFormatter,PrintWriter,int,String,String,Options,Object,Object,String)Object
      	at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:113)
      	at java.lang.invoke.MethodHandles.misMatchedTypes(MethodHandles.java:2198)
      	at java.lang.invoke.MethodHandles.guardWithTest(MethodHandles.java:2182)
      	at java.lang.invoke.SwitchPoint.guardWithTest(SwitchPoint.java:173)
      	at org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.setGuards(Selector.java:728)
      	at org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.setCallSiteTarget(Selector.java:820)
      	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:208)
      	at groovy.util.CliBuilder.usage(CliBuilder.groovy:275)
      	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:212)
      	at com.b2s.gretl.core.job.JobLauncher.run(JobLauncher.groovy:79)
      

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              fljmayer Felix L J Mayer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: