File tree 4 files changed +4
-4
lines changed
src/java.base/share/classes/java/util
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ public int hashCode() {
454
454
@ Override
455
455
public String toString () {
456
456
return value != null
457
- ? String . format ("Optional[%s]" , value )
457
+ ? ("Optional[" + value + "]" )
458
458
: "Optional.empty" ;
459
459
}
460
460
}
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ public int hashCode() {
328
328
@ Override
329
329
public String toString () {
330
330
return isPresent
331
- ? String . format ("OptionalDouble[%s]" , value )
331
+ ? ("OptionalDouble[" + value + "]" )
332
332
: "OptionalDouble.empty" ;
333
333
}
334
334
}
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ public int hashCode() {
326
326
@ Override
327
327
public String toString () {
328
328
return isPresent
329
- ? String . format ("OptionalInt[%s]" , value )
329
+ ? ("OptionalInt[" + value + "]" )
330
330
: "OptionalInt.empty" ;
331
331
}
332
332
}
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ public int hashCode() {
326
326
@ Override
327
327
public String toString () {
328
328
return isPresent
329
- ? String . format ("OptionalLong[%s]" , value )
329
+ ? ("OptionalLong[" + value + "]" )
330
330
: "OptionalLong.empty" ;
331
331
}
332
332
}
You can’t perform that action at this time.
0 commit comments