Github user jwagenleitner commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/292#discussion_r56734403
  
    --- Diff: src/main/org/codehaus/groovy/ast/expr/GStringExpression.java ---
    @@ -32,13 +32,15 @@
      */
     public class GStringExpression extends Expression {
     
    -    private String verbatimText;
    -    private List<ConstantExpression> strings = new 
ArrayList<ConstantExpression>();
    -    private List<Expression> values = new ArrayList<Expression>();
    +    private final String verbatimText;
    +    private final List<ConstantExpression> strings;
    +    private final List<Expression> values;
         
         public GStringExpression(String verbatimText) {
             this.verbatimText = verbatimText;
             super.setType(ClassHelper.GSTRING_TYPE);
    +        this.strings = new ArrayList<ConstantExpression>();
    +        this.values = new ArrayList<Expression>();
    --- End diff --
    
    This would cause a breaking change if any code relied on `#getStrings` or 
`#getValues` returning `null`.  I would avoid this change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to