Fix NPE compiler warning by short circuit.
MODIFY
src/main/java/org/apache/commons/io/file/PathUtils.java
src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -525,7 +525,7 @@ public static boolean directoryAndFileContentEquals(final Path path1, final Path
if (path1 == null && path2 == null) {
return true;
}
- if (path1 == null ^ path2 == null) {
+ if (path1 == null || path2 == null) {
return false;
}
if (!Files.exists(path1) && !Files.exists(path2)) {
@@ -621,7 +621,7 @@ public static boolean fileContentEquals(final Path path1, final Path path2, fina
if (path1 == null && path2 == null) {
return true;
}
- if (path1 == null ^ path2 == null) {
+ if (path1 == null || path2 == null) {
return false;
}
final Path nPath1 = path1.normalize();

Fix NPE compiler warning by short circuit.