Skip to content

Commit 2ce54ac

Browse files
committed
test: add null judge to avoid NullPointerException but why?
1 parent 5295a7a commit 2ce54ac

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/org/tron/core/config/args/Storage.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ public void deleteAllStoragePaths() {
141141
}
142142

143143
for (Property property : propertyMap.values()) {
144-
String path = property.getPath();
145-
if (path != null) {
146-
FileUtil.recursiveDelete(path);
144+
// TODO: NullPointerException in CI, but normal in local
145+
if (property != null) {
146+
String path = property.getPath();
147+
if (path != null) {
148+
FileUtil.recursiveDelete(path);
149+
}
147150
}
148151
}
152+
149153
}
150154

151155
private boolean hasProperty(String dbName) {

0 commit comments

Comments
 (0)