Out of curiosity, I tried to create a really big line. It turned out that the class Formatterthrottles according to width specifications that exceed Integer.MAX_VALUE:
String.format("%2147483648s", "");
So, I went to check that it really matches the specification. But all that he says
If the format specifier contains a width or precision with an invalid value or is not supported otherwise, then an IllegalFormatWidthException or IllegalFormatPrecisionException will be thrown.
So, in my opinion, the right behavior would be to quit IllegalFormatWidthException.
Is this error (?) Documented somewhere? (If not, I will talk about it.)
In addition, it should be noted that if you put in -front of the width (to align the left edge of the output):
String.format("%-2147483648s", "");
MissingFormatWidthException (, , ).
( OpenJDK 1.6.0_20.)