8284415: Collapse identical catch branches in security libs

Reviewed-by: coffeys, xuelei, wetmore
This commit is contained in:
Andrey Turbanov 2022-04-07 10:00:08 +00:00
parent 4f36229c96
commit 8e58d4a589
32 changed files with 74 additions and 197 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1507,9 +1507,7 @@ public abstract class Signature extends SignatureSpi {
protected byte[] engineSign() throws SignatureException {
try {
return cipher.doFinal();
} catch (IllegalBlockSizeException e) {
throw new SignatureException("doFinal() failed", e);
} catch (BadPaddingException e) {
} catch (IllegalBlockSizeException | BadPaddingException e) {
throw new SignatureException("doFinal() failed", e);
}
}