mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8276904: Optional.toString() is unnecessarily expensive
Reviewed-by: rriggs, smarks
This commit is contained in:
parent
6e7b7f352e
commit
fe2ae8e38b
4 changed files with 4 additions and 4 deletions
|
@ -328,7 +328,7 @@ public final class OptionalDouble {
|
|||
@Override
|
||||
public String toString() {
|
||||
return isPresent
|
||||
? String.format("OptionalDouble[%s]", value)
|
||||
? ("OptionalDouble[" + value + "]")
|
||||
: "OptionalDouble.empty";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue