@@ -84,7 +84,7 @@ class ProcessDestroyer implements Runnable {
} catch (NoSuchMethodException e) {
} catch (NoSuchMethodException e) {
// it just won't be added as a shutdown hook... :(
// it just won't be added as a shutdown hook... :(
} catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
e.printStackTrace(); //NOSONAR
}
}
}
}
@@ -100,14 +100,14 @@ class ProcessDestroyer implements Runnable {
addShutdownHookMethod.invoke(Runtime.getRuntime(), args);
addShutdownHookMethod.invoke(Runtime.getRuntime(), args);
added = true;
added = true;
} catch (IllegalAccessException e) {
} catch (IllegalAccessException e) {
e.printStackTrace();
e.printStackTrace(); //NOSONAR
} catch (InvocationTargetException e) {
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
Throwable t = e.getTargetException();
if (t != null && t.getClass() == IllegalStateException.class) {
if (t != null && t.getClass() == IllegalStateException.class) {
// shutdown already is in progress
// shutdown already is in progress
running = true;
running = true;
} else {
} else {
e.printStackTrace();
e.printStackTrace(); //NOSONAR
}
}
}
}
}
}
@@ -129,14 +129,14 @@ class ProcessDestroyer implements Runnable {
System.err.println("Could not remove shutdown hook");
System.err.println("Could not remove shutdown hook");
}
}
} catch (IllegalAccessException e) {
} catch (IllegalAccessException e) {
e.printStackTrace();
e.printStackTrace(); //NOSONAR
} catch (InvocationTargetException e) {
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
Throwable t = e.getTargetException();
if (t != null && t.getClass() == IllegalStateException.class) {
if (t != null && t.getClass() == IllegalStateException.class) {
// shutdown already is in progress
// shutdown already is in progress
running = true;
running = true;
} else {
} else {
e.printStackTrace();
e.printStackTrace(); //NOSONAR
}
}
}
}
// start the hook thread, a unstarted thread may not be
// start the hook thread, a unstarted thread may not be