mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8283800: Simplify String.indexOf/lastIndexOf calls
Reviewed-by: xuelei, bpb, lmesnik
This commit is contained in:
parent
b323f54fee
commit
9bb916db0a
6 changed files with 14 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -264,7 +264,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
throw new IllegalArgumentException("UUID string too large");
|
||||
}
|
||||
|
||||
int dash1 = name.indexOf('-', 0);
|
||||
int dash1 = name.indexOf('-');
|
||||
int dash2 = name.indexOf('-', dash1 + 1);
|
||||
int dash3 = name.indexOf('-', dash2 + 1);
|
||||
int dash4 = name.indexOf('-', dash3 + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue