Skip to content

Commit

Permalink
Chore: explicit type can be replaced with <>
Browse files Browse the repository at this point in the history
  • Loading branch information
dbmalkovsky committed Nov 7, 2024
1 parent 3b3c625 commit 5b77f70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/isf/security/TokenProviderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void testGenerateJwtToken() throws NoSuchFieldException, IllegalAccessExc
String token = tokenProvider.generateJwtToken(authentication, false);

// Get Claims from token
Claims claims = Jwts.parser().setSigningKey(key).build().parseClaimsJws(token).getBody();
Claims claims = Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(token).getBody();

// Assert the claims
assertThat(claims.getSubject()).isEqualTo("testuser");
Expand Down Expand Up @@ -309,7 +309,7 @@ public void testIsTokenExpired() throws Exception {
Date now = new Date();
Date expiredDate = new Date(now.getTime() - 1000); // 1 second in the past
String expiredToken = Jwts.builder()
.setClaims(Jwts.parser()
.setClaims(Jwts.parserBuilder()
.setSigningKey(key)
.build()
.parseClaimsJws(token)
Expand Down

0 comments on commit 5b77f70

Please sign in to comment.