Skip to content

Commit 4940fbd

Browse files
Document limitation of String.format
The null case is a bit special.
1 parent 4392850 commit 4940fbd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/java/lang/String.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,6 +3986,11 @@ static String cproverFormatArgument(Object obj) {
39863986
* <li>
39873987
* having 5 arguments or more makes the solver slow
39883988
* </li>
3989+
* <li>
3990+
* the string "null" is interpreted the same way {@code null} would be by
3991+
* the JDK String.format function, which is correct for the %s format
3992+
* specifier but not %b for instance.
3993+
* </li>
39893994
* </ul>
39903995
* @diffblue.untested
39913996
*/

0 commit comments

Comments
 (0)