diff --git a/src/main/java/io/jsonwebtoken/impl/DefaultJwtParser.java b/src/main/java/io/jsonwebtoken/impl/DefaultJwtParser.java index 2159e8af..b674da1f 100644 --- a/src/main/java/io/jsonwebtoken/impl/DefaultJwtParser.java +++ b/src/main/java/io/jsonwebtoken/impl/DefaultJwtParser.java @@ -232,16 +232,16 @@ public class DefaultJwtParser implements JwtParser { Jws jws = (Jws)jwt; Object body = jws.getBody(); if (body instanceof Claims) { - return handler.onClaimsJws(jws); + return handler.onClaimsJws((Jws)jws); } else { - return handler.onPlaintextJws(jws); + return handler.onPlaintextJws((Jws)jws); } } else { Object body = jwt.getBody(); if (body instanceof Claims) { - return handler.onPlaintextJwt(jwt); + return handler.onClaimsJwt((Jwt)jwt); } else { - return handler.onClaimsJwt(jwt); + return handler.onPlaintextJwt((Jwt)jwt); } } }