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

groovyc ant task creates invalid stub

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.6-rc-1, 1.5.8, 1.7-beta-1
    • None
    • None
    • WindowsXP, Ant 1.7.0

    Description

      When using the groovyc ant task, on certain conditions builds fail because the generated java stub is invalid.Our best example is when a groovy class inherits from a java class that has a basic type as a constructor parameter. The stub has a constructor that calls super(null, nulll), which fails when using a null type.

      ------java class----
      public class Parent {
      private String name;
      private int number;

      public Parent(String name, int number)

      { this.name=name; this.number=number; }

      }
      --------groovy class-------
      class Child extends Parent {
      public Child(String name, int number)

      { super(name,number); }

      }

      I've attached a working environment that reproduces the bug. just run the build file.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            blackdrag Jochen Theodorou
            hibikir Jorge Montero
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment