GMaven (OLD... DO NOT USE)
  1. GMaven (OLD... DO NOT USE)
  2. MGROOVY-204

CLONE -Multimethod groovy classes behave differently when called from java compared to Groovy

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: 1.0-rc-4
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven, groovy, java
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      I have a mixed groovy/java application where the domain model is implemented in groovy, and the java utilizes the groovy classes.
      I'm trying to use the multimethods functionality of groovy to do some nifty stuff, such as writing a simpler equals method.
      I have two scenarios of usage;

      • The groovy and java classes are in the same module
      • The application is multimodule, where code from a module depends on the groovy code, from a jar

      My problem is that the calling java code does not behave in the same way groovy calling code would. For example, different equals methods are apparently used.
      Why is this? Example attached.
      I guess this could be normal Groovy behavour, but is in which case something to beware of with mixed projects

      Is there any special way to package the groovy code (not as compiled class files), such as uncompiled .groovy files, that makes multimodule projects behave as wished?

        Activity

        Hide
        Rob Cauble added a comment -

        New reproduction scenario

        Show
        Rob Cauble added a comment - New reproduction scenario
        Hide
        Rob Cauble added a comment -

        closing this out since I realized it is incorrectly classified--sorry... Opening a new defect with the proper version, etc.

        Show
        Rob Cauble added a comment - closing this out since I realized it is incorrectly classified--sorry... Opening a new defect with the proper version, etc.

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Rob Cauble
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: