Glowman554 / BetterNudel

Mutable fields should not directly be returned JAVA-S1049
Security
Major
2 months ago2 months old
valueTokensOr could be modified at the call site
 20
 21    TokenType[] valueTokensOr(TokenType other) {
 22        valueTokensOr[0] = other;
 23        return valueTokensOr; 24    }
 25
 26    void end() {
net.shadew.json.JsonType.VALUES could be modified at the call site
147    // Internal no-copy version of allExcluding
148    static JsonType[] allExcluding0(JsonType type) {
149        if (type == null)
150            return VALUES;151        return EXCLUDING_ARRAYS[type.ordinal()].clone();
152    }
153}
valueTokensOr could be modified at the call site
 20
 21    TokenType[] valueTokensOr(TokenType other) {
 22        valueTokensOr[0] = other;
 23        return valueTokensOr; 24    }
 25
 26    void end() {
net.shadew.json.JsonType.VALUES could be modified at the call site
147    // Internal no-copy version of allExcluding
148    static JsonType[] allExcluding0(JsonType type) {
149        if (type == null)
150            return VALUES;151        return EXCLUDING_ARRAYS[type.ordinal()].clone();
152    }
153}