[
https://issues.apache.org/jira/browse/GROOVY-8774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-8774.
-------------------------------
Fix Version/s: 3.0.4
4.0.0-alpha-1
Resolution: Fixed
Proposed PR merged
> Stub generator doesn't handle package-info
> ------------------------------------------
>
> Key: GROOVY-8774
> URL: https://issues.apache.org/jira/browse/GROOVY-8774
> Project: Groovy
> Issue Type: Bug
> Components: Stub generator / Joint compiler
> Affects Versions: 2.5.2
> Reporter: Christopher Smith
> Assignee: Paul King
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.4
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The stub compiler seems to get confused with {{package-info.groovy}}, which
> may need special-casing. This source:
> {code:title=package-info.groovy}
> @org.hibernate.annotations.GenericGenerator(name = "random-uuid", strategy =
> "org.hibernate.id.UUIDGenerator")
> package my.application.domain.annotation
> {code}
> results in the stub
> {code:title=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
> {
> ;
> }
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)