Sonarqube抱怨条件
if(inputMsgPath==null || outputFormat==null || swiftStdsVersion==null)
(参见下面的代码段)总是评估为true,但事实并非如此。这只是一个sonarqube bug吗?
String inputMsgPath = null;
String outputFormat = null;
String swiftStdsVersion = null;
String assertionsPath = null;
List<Assertion> assertions = null;
for( int i=0; i<args.length; i+=2){
if("-i".equals(args[i])){
inputMsgPath = args[++i];
}
else if("-o".equals(args[i])){
outputFormat = args[++i];
}
else if("-s".equals(args[i])){
swiftStdsVersion = args[++i];
}
else if("-a".equals(args[i])){
assertionsPath = args[++i];
}
}
if(inputMsgPath==null || outputFormat==null || swiftStdsVersion==null){
printSyntax();
return;
}