mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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
|
@ -157,7 +157,7 @@ public class HttpCapture {
|
|||
if (p.matcher(s).find()) {
|
||||
String f = capFiles.get(i);
|
||||
File fi;
|
||||
if (f.indexOf("%d") >= 0) {
|
||||
if (f.contains("%d")) {
|
||||
java.util.Random rand = new java.util.Random();
|
||||
do {
|
||||
String f2 = f.replace("%d", Integer.toString(rand.nextInt()));
|
||||
|
|
|
@ -645,7 +645,7 @@ final class HttpsClient extends HttpClient
|
|||
// ignore
|
||||
}
|
||||
|
||||
if ((cipher != null) && (cipher.indexOf("_anon_") != -1)) {
|
||||
if ((cipher != null) && (cipher.contains("_anon_"))) {
|
||||
return;
|
||||
} else if ((hostnameVerifier != null) &&
|
||||
(hostnameVerifier.verify(host, session))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue