This commit is contained in:
Sebb 2020-09-12 23:31:44 +01:00
parent 38a9209456
commit 7ab21126a0
1 changed files with 2 additions and 2 deletions

View File

@ -869,7 +869,7 @@ public class StringUtils {
* @since 3.5
*/
public static int compare(final String str1, final String str2, final boolean nullIsLess) {
if (str1 == str2) {
if (str1 == str2) { // NOSONARLINT this intentionally uses == to allow for both null
return 0;
}
if (str1 == null) {
@ -962,7 +962,7 @@ public class StringUtils {
* @since 3.5
*/
public static int compareIgnoreCase(final String str1, final String str2, final boolean nullIsLess) {
if (str1 == str2) {
if (str1 == str2) { // NOSONARLINT this intentionally uses == to allow for both null
return 0;
}
if (str1 == null) {