Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
1.8.6
-
None
-
None
-
WinXP SP3, Oracle JDK 1.7.0_05, gmaven-runtime-1.8 v1.4, groovy-all artifact v1.8.6
Description
I'm experiencing problems identical to those described in GROOVY-5212, but that issue is supposed to be fixed in 1.8.6. I have declared two public enums, and the build process fails because in the generated stubs they are declared as 'public final enum' which is syntactically invalid.
Maven output:
[INFO] Compiling 20 source files to C:\Documents and Settings\Administrator\digitizer\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] C:\Documents and Settings\Administrator\digitizer\target\generated-sources\groovy-stubs\main\nz\ac\auckland\digitizer\streamer\StreamingAgent.java:[15,13] error: modifier final not allowed here
[ERROR] C:\Documents and Settings\Administrator\digitizer\target\generated-sources\groovy-stubs\main\nz\ac\auckland\digitizer\agent\Agent.java:[31,13] error: modifier final not allowed here
[INFO] 2 errors
From Agent.groovy:
abstract class Agent {
enum State
protected Thread thread
...
From StreamingAgent.groovy:
public interface StreamingAgent {
enum StreamState
void startStreaming(Recording rec)
...
Apparently the patch submitted for GROOVY-5212 didn't work, or was not included in the release?
What's strange is that for some time these enums were both compiling fine. But the stub generator has seemingly arbitrarily decided to start doing the wrong thing now.