Examples of errors detected by the V6091 diagnostic
V6091. Suspicious getter/setter implementation. The 'A' field should probably be returned/assigned instead.
jBullet
V6091 Suspicious getter implementation. The 'solveSwingLimit' field should probably be returned instead. ConeTwistConstraint.java(407), ConeTwistConstraint.java(74)
public class ConeTwistConstraint extends TypedConstraint {
....
private boolean solveTwistLimit;
private boolean solveSwingLimit;
....
public boolean getSolveTwistLimit() {
return solveTwistLimit;
}
public boolean getSolveSwingLimit() {
return solveTwistLimit;
}
}
Apache Solr
V6091 Suspicious getter implementation. The 'parseToEnd' field should probably be returned instead. FunctionQParser.java 87, FunctionQParser.java 57
public class FunctionQParser extends QParser {
....
boolean parseMultipleSources = true;
boolean parseToEnd = true;
....
public void setParseMultipleSources(boolean parseMultipleSources) {
this.parseMultipleSources = parseMultipleSources;
}
/** parse multiple comma separated value sources */
public boolean getParseMultipleSources() {
return parseMultipleSources;
}
public void setParseToEnd(boolean parseToEnd) {
this.parseToEnd = parseToEnd;
}
/** throw exception if there is extra
stuff at the end of the parsed valuesource(s). */
public boolean getParseToEnd() {
return parseMultipleSources;
}
....
}
Elasticsearch
V6091 Suspicious getter implementation. The 'isAsync' field should probably be returned instead. EsqlQueryResponse.java 180
private final boolean isRunning;
private final boolean isAsync;
....
public boolean isRunning() {
return isRunning;
}
public boolean isAsync() {
return isRunning;
}
Elasticsearch
V6091 Suspicious getter implementation. The 'isSymbolicLink' field should probably be returned instead. DockerFileAttributes.java 67
boolean isDirectory;
boolean isSymbolicLink;
....
@Override
public boolean isDirectory() {
return isDirectory;
}
@Override
public boolean isSymbolicLink() {
return isDirectory;
}