mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +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
|
@ -1473,10 +1473,10 @@ public final class Main {
|
|||
if (s == null) break;
|
||||
// OpenSSL does not use NEW
|
||||
//if (s.startsWith("-----BEGIN NEW CERTIFICATE REQUEST-----")) {
|
||||
if (s.startsWith("-----BEGIN") && s.indexOf("REQUEST") >= 0) {
|
||||
if (s.startsWith("-----BEGIN") && s.contains("REQUEST")) {
|
||||
canRead = true;
|
||||
//} else if (s.startsWith("-----END NEW CERTIFICATE REQUEST-----")) {
|
||||
} else if (s.startsWith("-----END") && s.indexOf("REQUEST") >= 0) {
|
||||
} else if (s.startsWith("-----END") && s.contains("REQUEST")) {
|
||||
break;
|
||||
} else if (canRead) {
|
||||
sb.append(s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue