JDK-5063507 : (fmt) missing exception for "%#s" format specifier
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.util
  • Priority: P3
  • Affected Version: 5.0,6
  • OS: solaris_8,windows_xp
  • CPU: generic
  • Submit Date: 2004-06-15
  • Updated Date: 2017-05-16
  • Resolved Date: 2009-08-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 7
7 b70Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
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