Skip to content

Commit dc9df09

Browse files
committed
PMD
1 parent 3b91ca2 commit dc9df09

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

cloudplatform/resilience4j/src/main/java/com/sap/cloud/sdk/cloudplatform/resilience4j/DefaultCircuitBreakerProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ public <T> Callable<T> decorateCallable(
8989
if( lastException == null ) {
9090
throw new ResilienceRuntimeException(message, e);
9191
}
92-
val resilienceRuntimeException = new ResilienceRuntimeException(message + ". Triggered by " + lastException.getMessage(), lastException);
92+
val resilienceRuntimeException =
93+
new ResilienceRuntimeException(
94+
message + ". Triggered by " + lastException.getMessage(),
95+
lastException);
9396
resilienceRuntimeException.addSuppressed(e);
9497
throw resilienceRuntimeException;
9598
}

cloudplatform/resilience4j/src/test/java/com/sap/cloud/sdk/cloudplatform/resilience4j/CircuitBreakerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ void testCircuitBreakerOpens()
8484
.isExactlyInstanceOf(ResilienceRuntimeException.class)
8585
.hasCauseExactlyInstanceOf(ThreadContextExecutionException.class)
8686
.hasRootCauseExactlyInstanceOf(Exception.class)
87-
.hasMessage("CircuitBreaker 'circuitbreaker.test.2' is OPEN and does not permit further calls. Triggered by java.lang.Exception: Simulated failure, attempt nr: 3");
87+
.hasMessage(
88+
"CircuitBreaker 'circuitbreaker.test.2' is OPEN and does not permit further calls. Triggered by java.lang.Exception: Simulated failure, attempt nr: 3");
8889

8990
assertThat(thrown.getCause()).hasMessage("java.lang.Exception: Simulated failure, attempt nr: 3");
9091

0 commit comments

Comments
 (0)