[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084736#comment-17084736 ]
Daniel Sun edited comment on GROOVY-9511 at 4/16/20, 10:32 AM: --------------------------------------------------------------- After the newline following the {{@JoinTable}} removed, the Parrot parser is happy: {code:java} class OtherSection { @CollectionOfElements @JoinTable( table = @Table(name="gaga"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoritepoupon", nullable=false) Set<String> questions = new HashSet<String> () } {code} was (Author: daniel_sun): Remove the newline following the {{@JoinTable}}, the parser is happy: {code:java} class OtherSection { @CollectionOfElements @JoinTable( table = @Table(name="gaga"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoritepoupon", nullable=false) Set<String> questions = new HashSet<String> () } {code} > Multiline annotations involving other annotations not supported by Parrot > ------------------------------------------------------------------------- > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug > Reporter: Paul King > Priority: Major > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set<String> questions = new HashSet<String> () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)