Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.6
-
Fix Version/s: 2.0-beta-3, 1.8.7
-
Component/s: Stub generator / Joint compiler
-
Labels:None
-
Number of attachments :
Description
When using the groovyc joint compilation feature, the generated stub is incorrect when the groovy source includes a protected (possibly affects public too, I didn't test) multi-line String 'constant'.
For example,
class Example
{ protected static final String CONSTANT_VALUE = """ I am a constant value Thank you """ }
would generate a stub:
public Example extends java.lang.Object implements groovy.lang.GroovyObject
{ protected static final java.lang.String CONSTANT_VALUE = " I am a constant value Thank you "; }This is a syntactically incorrect Java statement.
Issue Links
- relates to
-
GROOVY-5150
Switch to a primitive representation of constants
-
Activity
Paul King
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Link |
This issue relates to |
Paul King
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Paul King [ paulk ] | |
| Fix Version/s | 2.0-beta-3 [ 18244 ] | |
| Fix Version/s | 1.8.7 [ 18317 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
I apologize, the formatting wasn't preserved.
Sample code:
class Example { protected static final String CONSTANT_VALUE = """ I am a constant value Thank you """ }Generating stub: