SonarOpenCommunity / sonar-cxx

Mutable fields should not directly be returned JAVA-S1049
Security
Major
6 months agoa year old
43  }
44
45  public Instruction[] getInstructions() {
46    return instructions;47  }
48
49  public Matcher getMatcher(GrammarRuleKey ruleKey) {
org.sonar.cxx.sslr.internal.matchers.LocatedText.EMPTY_INT_ARRAY could be modified at the call site
105      i++;
106    }
107    if (newlines.isEmpty()) {
108      return EMPTY_INT_ARRAY;109    }
110    var lines = new int[newlines.size()];
111    for (i = 0; i < newlines.size(); i++) {
 62  }
 63
 64  Channel[] getChannels() {
 65    return channels; 66  }
 67
 68  /**
 61  }
 62
 63  public char[] input() {
 64    return inputChars; 65  }
 66
 67  public URI uri() {
103  }
104
105  public Object[] getMessageArguments() {
106    return messageArguments;107  }
108
109  @Override