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)) {
818818 }
819819
820820 /**
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}.
822823 * @param path1 first path for comparison
823824 * @param path2 second path for comparison
824825 * @return whether the two paths are equivalent after normalization
825826 */
826827 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 ));
828829 }
829830
830831 /**
You can’t perform that action at this time.
0 commit comments