Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 569aadc

Browse files
authored
Fix possible null dereference (#28)
1 parent c923bc4 commit 569aadc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SecurityAPICommons/src/main/java/com/genexus/securityapicommons/utils/SecurityUtils.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
public class SecurityUtils {
1515

1616
public static boolean compareStrings(String one, String two) {
17-
return one.compareToIgnoreCase(two) == 0;
18-
17+
if (one != null && two != null) {
18+
return one.compareToIgnoreCase(two) == 0;
19+
} else {
20+
return false;
21+
}
1922

2023
}
2124

0 commit comments

Comments
 (0)