Skip to content

Commit 83acf6c

Browse files
luis100hmiguim
authored andcommitted
Removing error on shutdown hook
1 parent 22ff774 commit 83acf6c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

dbptk-model/src/main/java/com/databasepreservation/common/io/providers/TemporaryPathInputStreamProvider.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,11 @@ public TemporaryPathInputStreamProvider(InputStream inputStream) throws ModuleEx
7070
}
7171
}
7272

73-
StringBuilder stackTraceBuilder = new StringBuilder();
74-
for (StackTraceElement stackTraceElement : Thread.currentThread().getStackTrace()) {
75-
stackTraceBuilder.append(stackTraceElement.toString()).append(System.lineSeparator());
76-
}
77-
final String stackTrace = stackTraceBuilder.toString();
78-
7973
removeTemporaryFileHook = new Thread() {
8074
@Override
8175
public void run() {
8276
TemporaryPathInputStreamProvider.this.removeTemporaryFileHook = null;
8377
TemporaryPathInputStreamProvider.this.cleanResources();
84-
throw new IllegalStateException("A PathInputStreamProvider was cleaned by a shutdown hook. Path: "
85-
+ TemporaryPathInputStreamProvider.this.path.toAbsolutePath().toString() + ". Source: " + stackTrace);
8678
}
8779
};
8880

0 commit comments

Comments
 (0)