Skip to content

Commit 4e1c132

Browse files
authored
hotfix(RSSHandlerRoutine): resolve java:S121 (#1364)
While analyzing the code, SonarQube is rightfully complaining about: Control structures should use curly braces. Fix this by simply adding curly braces to the if statement. Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
1 parent 04b94df commit 4e1c132

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

application/src/main/java/org/togetherjava/tjbot/features/rss/RSSHandlerRoutine.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,9 @@ private long calculateWaitHours(int failureCount) {
465465

466466
private boolean isBackingOff(String url) {
467467
FailureState state = circuitBreaker.getIfPresent(url);
468-
if (state == null)
468+
if (state == null) {
469469
return false;
470+
}
470471

471472
long waitHours = calculateWaitHours(state.count());
472473
ZonedDateTime retryAt = state.lastFailure().plusHours(waitHours);

0 commit comments

Comments
 (0)