Skip to content

Commit d88266e

Browse files
Document limitation of String.format
The null case is a bit special.
1 parent d23a1dd commit d88266e

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
@@ -3982,6 +3982,11 @@ static String cproverFormatArgument(Object obj) {
39823982
* <li>
39833983
* having 5 arguments or more makes the solver slow
39843984
* </li>
3985+
* <li>
3986+
* the string "null" is interpreted the same way {@code null} would be by
3987+
* the JDK format, which is correct for the %s format specifier but not
3988+
* %b for instance.
3989+
* </li>
39853990
* </ul>
39863991
* @diffblue.untested
39873992
*/

0 commit comments

Comments
 (0)