Skip to content

Commit

Permalink
Don't use instance of for simple null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Jan 10, 2025
1 parent 1a3936f commit 67da7ff
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,9 @@ private void doShutdown() {
if (toCancel != null) {
for (Job job : toCancel) {
String jobName = printJobName(job) + " " + printState(job); //$NON-NLS-1$
if (job.getThread() instanceof Thread t) {
StackTraceElement[] stackTrace = t.getStackTrace();
Thread thread = job.getThread();
if (thread != null) {
StackTraceElement[] stackTrace = thread.getStackTrace();
for (StackTraceElement stackTraceElement : stackTrace) {
jobName += "\n\t at " + stackTraceElement; //$NON-NLS-1$
}
Expand Down

0 comments on commit 67da7ff

Please sign in to comment.