File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
src/main/java/org/tron/core/config/args Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,12 @@ public static void clearParam() {
225225 INSTANCE .storageDbDirectory = "" ;
226226 INSTANCE .storageIndexDirectory = "" ;
227227
228- // WARNING: WILL DELETE DB STORAGE PATHS
229- INSTANCE .storage .deleteAllStoragePaths ();
230- INSTANCE .storage = null ;
228+ // FIXME: INSTANCE.storage maybe null ?
229+ if (INSTANCE .storage != null ) {
230+ // WARNING: WILL DELETE DB STORAGE PATHS
231+ INSTANCE .storage .deleteAllStoragePaths ();
232+ INSTANCE .storage = null ;
233+ }
231234
232235 INSTANCE .overlay = null ;
233236 INSTANCE .seedNode = null ;
Original file line number Diff line number Diff line change @@ -141,15 +141,11 @@ public void deleteAllStoragePaths() {
141141 }
142142
143143 for (Property property : propertyMap .values ()) {
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- }
144+ String path = property .getPath ();
145+ if (path != null ) {
146+ FileUtil .recursiveDelete (path );
150147 }
151148 }
152-
153149 }
154150
155151 private boolean hasProperty (String dbName ) {
You can’t perform that action at this time.
0 commit comments