Skip to content

Commit f68c624

Browse files
committed
fix: fix sonar on publisher-subscriber design pattern (#2898)
1 parent 0f6b3b4 commit f68c624

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

publish-subscribe/src/main/java/com/iluwatar/publish/subscribe/subscriber/DelayedWeatherSubscriber.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ private void processData() {
3030
try {
3131
TimeUnit.MILLISECONDS.sleep(2000);
3232
} catch (InterruptedException e) {
33-
throw new RuntimeException(e);
33+
logger.error("Interrupted!", e);
34+
Thread.currentThread().interrupt();
3435
}
3536
}
3637
}

0 commit comments

Comments
 (0)