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

DocGenerator doesn't understand generics placeholders

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.2
    • 2.4.2
    • None
    • None

    Description

      DocGenerator doesn't understand generics placeholders, e.g.: as part of GROOVY-7281, the type signature of a DGM withStream method changed from:

      public static <T> T withStream(InputStream stream, @ClosureParams(value=SimpleType.class, options="java.io.InputStream") Closure<T> closure) throws IOException {
      

      to:

      public static <T, U extends InputStream> T withStream(U stream, @ClosureParams(value=FirstParam.class) Closure<T> closure) throws IOException {
      

      DocGenerator doesn't know about "extends" and currently maps all placeholders onto java.lang.Object. Hence they show up as extensions on java.lang.Object and in fact the InputStream version clobbers the OutputStream version since they will have the same signature once incorrectly mapped to Object.

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: