File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
spring-core/src/main/java/org/springframework/util Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -818,13 +818,14 @@ else if (TOP_PATH.equals(element)) {
818
818
}
819
819
820
820
/**
821
- * Compare two paths after normalization of them.
821
+ * Compare two paths after normalization of them. Results in false if any or both of
822
+ * the supplied path values are {@code null}.
822
823
* @param path1 first path for comparison
823
824
* @param path2 second path for comparison
824
825
* @return whether the two paths are equivalent after normalization
825
826
*/
826
827
public static boolean pathEquals (String path1 , String path2 ) {
827
- return cleanPath (path1 ).equals (cleanPath (path2 ));
828
+ return ( path1 == null || path2 == null ) ? false : cleanPath (path1 ).equals (cleanPath (path2 ));
828
829
}
829
830
830
831
/**
You can’t perform that action at this time.
0 commit comments