@@ -111,7 +111,8 @@ private JWK selectJwk(JwsHeader headers) {
111111 try {
112112 JWKSelector jwkSelector = new JWKSelector (createJwkMatcher (headers ));
113113 jwks = this .jwkSource .get (jwkSelector , null );
114- } catch (Exception ex ) {
114+ }
115+ catch (Exception ex ) {
115116 throw new JwtEncodingException (String .format (ENCODING_ERROR_MESSAGE_TEMPLATE ,
116117 "Failed to select a JWK signing key -> " + ex .getMessage ()), ex );
117118 }
@@ -139,7 +140,8 @@ private String serialize(JwsHeader headers, JwtClaimsSet claims, JWK jwk) {
139140 SignedJWT signedJwt = new SignedJWT (jwsHeader , jwtClaimsSet );
140141 try {
141142 signedJwt .sign (jwsSigner );
142- } catch (JOSEException ex ) {
143+ }
144+ catch (JOSEException ex ) {
143145 throw new JwtEncodingException (
144146 String .format (ENCODING_ERROR_MESSAGE_TEMPLATE , "Failed to sign the JWT -> " + ex .getMessage ()), ex );
145147 }
@@ -159,7 +161,8 @@ private static JWKMatcher createJwkMatcher(JwsHeader headers) {
159161 .x509CertSHA256Thumbprint (Base64URL .from (headers .getX509SHA256Thumbprint ()))
160162 .build ();
161163 // @formatter:on
162- } else if (JWSAlgorithm .Family .HMAC_SHA .contains (jwsAlgorithm )) {
164+ }
165+ else if (JWSAlgorithm .Family .HMAC_SHA .contains (jwsAlgorithm )) {
163166 // @formatter:off
164167 return new JWKMatcher .Builder ()
165168 .keyType (KeyType .forAlgorithm (jwsAlgorithm ))
@@ -197,7 +200,8 @@ private static JwsHeader addKeyIdentifierHeadersIfNecessary(JwsHeader headers, J
197200 private static JWSSigner createSigner (JWK jwk ) {
198201 try {
199202 return JWS_SIGNER_FACTORY .createJWSSigner (jwk );
200- } catch (JOSEException ex ) {
203+ }
204+ catch (JOSEException ex ) {
201205 throw new JwtEncodingException (String .format (ENCODING_ERROR_MESSAGE_TEMPLATE ,
202206 "Failed to create a JWS Signer -> " + ex .getMessage ()), ex );
203207 }
@@ -214,7 +218,8 @@ private static JWSHeader convert(JwsHeader headers) {
214218 if (!CollectionUtils .isEmpty (jwk )) {
215219 try {
216220 builder .jwk (JWK .parse (jwk ));
217- } catch (Exception ex ) {
221+ }
222+ catch (Exception ex ) {
218223 throw new JwtEncodingException (String .format (ENCODING_ERROR_MESSAGE_TEMPLATE ,
219224 "Unable to convert '" + JoseHeaderNames .JWK + "' JOSE header" ), ex );
220225 }
@@ -331,7 +336,8 @@ private static JWTClaimsSet convert(JwtClaimsSet claims) {
331336 private static URI convertAsURI (String header , URL url ) {
332337 try {
333338 return url .toURI ();
334- } catch (Exception ex ) {
339+ }
340+ catch (Exception ex ) {
335341 throw new JwtEncodingException (String .format (ENCODING_ERROR_MESSAGE_TEMPLATE ,
336342 "Unable to convert '" + header + "' JOSE header to a URI" ), ex );
337343 }
0 commit comments