Skip to content

Commit 57136d6

Browse files
committed
Simplify the condition
Signed-off-by: Sai Rohith Reddy <[email protected]>
1 parent 46d0c02 commit 57136d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ else if (TOP_PATH.equals(element)) {
825825
* @return whether the two paths are equivalent after normalization
826826
*/
827827
public static boolean pathEquals(String path1, String path2) {
828-
return (path1 == null || path2 == null) ? false : cleanPath(path1).equals(cleanPath(path2));
828+
return (path1 != null && path2 != null) && cleanPath(path1).equals(cleanPath(path2));
829829
}
830830

831831
/**

0 commit comments

Comments
 (0)