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

Stub generator doesn't handle package-info

    XMLWordPrintableJSON

    Details

      Description

      The stub compiler seems to get confused with package-info.groovy, which may need special-casing. This source:

      package-info.groovy
      @org.hibernate.annotations.GenericGenerator(name = "random-uuid", strategy = "org.hibernate.id.UUIDGenerator")
      package my.application.domain.annotation
      

      results in the stub

      package-info.java
      package my.application..domain.annotation;
      
      import java.lang.*;
      import java.io.*;
      import java.net.*;
      import java.util.*;
      import groovy.lang.*;
      import groovy.util.*;
      interface package-info
       {
      ;
      }
      

      which predictably fails because package-info is not a valid identifier. Given the semantics of package-info.java (and especially that imports aren't allowed), it might make sense to special-case this and just repeat the input file with a trailing semicolon.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                chrylis Christopher Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m