File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
src/java.base/share/classes/java/util Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ public int hashCode() {
454454 @ Override
455455 public String toString () {
456456 return value != null
457- ? String . format ("Optional[%s]" , value )
457+ ? ("Optional[" + value + "]" )
458458 : "Optional.empty" ;
459459 }
460460}
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ public int hashCode() {
328328 @ Override
329329 public String toString () {
330330 return isPresent
331- ? String . format ("OptionalDouble[%s]" , value )
331+ ? ("OptionalDouble[" + value + "]" )
332332 : "OptionalDouble.empty" ;
333333 }
334334}
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ public int hashCode() {
326326 @ Override
327327 public String toString () {
328328 return isPresent
329- ? String . format ("OptionalInt[%s]" , value )
329+ ? ("OptionalInt[" + value + "]" )
330330 : "OptionalInt.empty" ;
331331 }
332332}
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ public int hashCode() {
326326 @ Override
327327 public String toString () {
328328 return isPresent
329- ? String . format ("OptionalLong[%s]" , value )
329+ ? ("OptionalLong[" + value + "]" )
330330 : "OptionalLong.empty" ;
331331 }
332332}
You can’t perform that action at this time.
0 commit comments