mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8274949: Use String.contains() instead of String.indexOf() in java.base
Reviewed-by: weijun, dfuchs, vtewari, lancea
This commit is contained in:
parent
09e8c8c64a
commit
6677554374
17 changed files with 35 additions and 38 deletions
|
@ -59,7 +59,7 @@ public class RSAPSSSignature extends SignatureSpi {
|
|||
private boolean isDigestEqual(String stdAlg, String givenAlg) {
|
||||
if (stdAlg == null || givenAlg == null) return false;
|
||||
|
||||
if (givenAlg.indexOf("-") != -1) {
|
||||
if (givenAlg.contains("-")) {
|
||||
return stdAlg.equalsIgnoreCase(givenAlg);
|
||||
} else {
|
||||
if (stdAlg.equals("SHA-1")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue