This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push:
new 58eb49cf4 Flip null test
58eb49cf4 is described below
commit 58eb49cf46e39a5195b0116e2bb70fa0c95562a2
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 5 09:43:02 2026 -0400
Flip null test
---
.../java/org/apache/commons/vfs2/provider/hdfs/HdfsFileObject.java | 2 +-
.../java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java | 4 ++--
.../org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java | 4 ++--
.../apache/commons/vfs2/provider/hdfs/HdfsFileProviderTestCase.java | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileObject.java
b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileObject.java
index 099193af2..19d00475a 100644
---
a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileObject.java
+++
b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileObject.java
@@ -153,7 +153,7 @@ public class HdfsFileObject extends
AbstractFileObject<HdfsFileSystem> {
@Override
protected long doGetLastModifiedTime() throws Exception {
doAttach();
- if (null != stat) {
+ if (stat != null) {
return stat.getModificationTime();
}
return -1;
diff --git
a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
index 6308f7288..14055e3de 100644
---
a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
+++
b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
@@ -73,7 +73,7 @@ public class HdfsFileSystem extends AbstractFileSystem {
*/
@Override
public void close() {
- if (null != fs) {
+ if (fs != null) {
Uncheck.run(fs::close);
}
super.close();
@@ -148,7 +148,7 @@ public class HdfsFileSystem extends AbstractFileSystem {
}
}
- final boolean useCache = null !=
getFileSystemManager().getFilesCache();
+ final boolean useCache = getFileSystemManager().getFilesCache() !=
null;
FileObject fileObject = useCache ? getFileFromCache(name) : null;
if (null == fileObject) {
String path;
diff --git
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
index ee77d2216..2a09c13df 100644
---
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
+++
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
@@ -138,7 +138,7 @@ public class HdfsFileProviderTest {
@AfterAll
public static void tearDown() throws Exception {
- if (null != hdfs) {
+ if (hdfs != null) {
hdfs.close();
}
if (manager != null) {
@@ -148,7 +148,7 @@ public class HdfsFileProviderTest {
@AfterEach
public void after() throws Exception {
- if (null != hdfs) {
+ if (hdfs != null) {
hdfs.delete(DIR1_PATH, true);
}
}
diff --git
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTestCase.java
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTestCase.java
index 98a711c66..8f4061908 100644
---
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTestCase.java
+++
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTestCase.java
@@ -133,7 +133,7 @@ public class HdfsFileProviderTestCase extends
AbstractProviderTestConfig {
@Override
protected void tearDown() throws Exception {
super.tearDown();
- if (null != hdfs) {
+ if (hdfs != null) {
hdfs.close();
}
}