|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
The formatter spec says of the 's' general conversion:
If the '#' flag is given and the argument is not a Formattable,
then a FormatFlagsConversionMismatchException will be thrown.
but the implementation fails to do that:
==========$ cat -n T.java
1 import java.util.*;
2 class T {
3 public static void main(String[] args) {
4 System.out.printf("%#s%n", 0);
5 }
6 }
==========$ /usr/j2sdk1.5.0/bin/javac T.java
==========$ /usr/j2sdk1.5.0/bin/java T
0
==========$
|