Skip to content

Commit fbe0356

Browse files
Copilotebyhr
andcommitted
Fix deprecation warning: Replace java.util.Date with Instant in JWT creation
Co-authored-by: ebyhr <[email protected]>
1 parent 0b66cb1 commit fbe0356

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gateway-ha/src/test/java/io/trino/gateway/ha/router/TestTrinoRequestUser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import java.time.Instant;
2525
import java.util.Base64;
26-
import java.util.Date;
2726
import java.util.Optional;
2827

2928
import static com.auth0.jwt.algorithms.Algorithm.HMAC256;
@@ -71,7 +70,7 @@ void testUserFromJwtToken()
7170
String token = JWT.create()
7271
.withIssuer("gateway")
7372
.withClaim(claimUserName, claimUserValue)
74-
.withExpiresAt(Date.from(expiryTime))
73+
.withExpiresAt(expiryTime)
7574
.sign(algorithm);
7675

7776
HttpServletRequest mockRequest = new QueryRequestMock()

0 commit comments

Comments
 (0)