Skip to content

Commit fe72794

Browse files
committed
fix: ensure embedded PostgreSQL is cleaned up on crash or forced termination (Fix JabRef#12844)
* Fix for trag-bot comments.
1 parent 9447181 commit fe72794

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/jabref/logic/search/PostgreProcessCleaner.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ private void destroyPostgresProcess(int port) throws InterruptedException {
7676
}
7777

7878
private void destroyProcessByPID(long pid) throws InterruptedException {
79-
Optional<ProcessHandle> aliveProcess = ProcessHandle.of(pid)
80-
.filter(ProcessHandle::isAlive);
79+
Optional<ProcessHandle> aliveProcess = ProcessHandle.of(pid).filter(ProcessHandle::isAlive);
8180
if (aliveProcess.isPresent()) {
8281
aliveProcess.get().destroy();
8382
Thread.sleep(PostgreProcessCleaner.POSTGRES_SHUTDOWN_WAIT_MILLIS);

0 commit comments

Comments
 (0)