You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using our java code remediation solution, we detected that the project's source code contained 3 violations of the Sonar rule RSPEC-2692 "indexOf" checks must not be used to check whether a value is included in a string or a list".
Below is an example of how our Indepth solution could fix the problem (https://www.indepth.fr/)
For your information, using Indepth is free for all Opensource projects.
com\eviware\soapui\impl\wsdl\support\PathUtils.java@@ -159,5 +159,5@@
}
- if (StringUtils.isNullOrEmpty(project.getPath()) && project.getResourceRoot().indexOf("${projectDir}") >= 0) {
+ if (StringUtils.isNullOrEmpty(project.getPath()) && project.getResourceRoot().contains("${projectDir}")) {
if (UISupport.confirm("Save project before setting path?", "Project has not been saved")) {
try {
com\eviware\soapui\model\propertyexpansion\PropertyExpansionUtils.java@@ -461,5 +461,5@@publicstaticbooleancontainsPropertyExpansion(Stringstr) {
- returnstr != null && str.indexOf("${") >= 0 && str.indexOf('}') > 2;
+ returnstr != null && str.contains("${") && str.indexOf('}') > 2;
}
}
com\eviware\soapui\support\SecurityScanUtil.java@@ -101,5 +101,5@@
}
} else {
- if (content.toUpperCase().indexOf(replToken.toUpperCase()) >= 0) {
+ if (content.toUpperCase().contains(replToken.toUpperCase())) {
result = replToken;
}
The text was updated successfully, but these errors were encountered:
Using our java code remediation solution, we detected that the project's source code contained 3 violations of the Sonar rule RSPEC-2692 "indexOf" checks must not be used to check whether a value is included in a string or a list".
Below is an example of how our Indepth solution could fix the problem (https://www.indepth.fr/)
For your information, using Indepth is free for all Opensource projects.
The text was updated successfully, but these errors were encountered: