Skip to content

Commit

Permalink
Merge pull request #9904 from qmonmert/sonar250524
Browse files Browse the repository at this point in the history
Sonar: code smells
  • Loading branch information
pascalgrimaud committed May 25, 2024
2 parents 55e366c + bbe8513 commit 6cadd5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public final class CucumberRestTestContext {

private void retry() {
try {
ClientHttpResponse response = execution.execute(request, body);
ClientHttpResponse clientHttpResponse = execution.execute(request, body);
CucumberRestTestContext.addResponse(request, response, execution, body);
CucumberRestTestContext.addResponse(request, clientHttpResponse, execution, body);
} catch (IOException e) {
throw new AssertionError("Error while retrying last call: " + e.getMessage(), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class AuthenticationSteps {
.builder()
.subject("authentication")
.signWith(CucumberAuthenticationConfiguration.JWT_KEY)
.setClaims(claims)
.claims(claims)
.expiration(Date.from(Instant.now().plusSeconds(300)))
.compact();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class CucumberAuthenticationConfiguration {
Instant.now(),
Instant.now().plusSeconds(120),
Map.of("issuer", "http://dev"),
decoder.parseClaimsJws(token).getBody()
decoder.parseSignedClaims(token).getPayload()
);
}
}

0 comments on commit 6cadd5d

Please sign in to comment.