United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5063507 : (fmt) missing exception for "%#s" format specifier

Details
Type:
Bug
Submit Date:
2004-06-15
Status:
Resolved
Updated Date:
2009-08-14
Project Name:
JDK
Resolved Date:
2009-08-14
Component:
core-libs
OS:
solaris_8,windows_xp
Sub-Component:
java.util
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0,6
Fixed Versions:

Related Reports
Duplicate:
Relates:
Relates:

Sub Tasks

Description
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
==========$

                                    

Comments
EVALUATION

Not for Tiger.

-- iag@sfbay 2004-07-28
                                     
2004-07-28



Hardware and Software, Engineered to Work Together