Harmony
  1. Harmony
  2. HARMONY-455

java.util.Formatter.format() is not implemented

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None

      Description

      Hello,

      java.util.Formatter.format() is not implemented. I will attach the patch soon. Thanks a lot.

        Activity

        Richard Liang created issue -
        Hide
        Paulex Yang added a comment -

        The format() is partly implemented in this patch, the integer/float/data format feature is not included because this patch is not small already. I'll attach the features left if this one is acceptted.

        There are some tests fail on RI, and I consider they are RI's bugs, as below:

        FomatterTest.test_formatLjava_lang_String$Ljava_lang_Object_Percent(), Line1062: error on RI, specification says FormatFlagsConversionMismatchException should be thrown but RI throw IllegalFormatFlagsException.

        FomatterTest.test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversion(), Line1257: fail on RI. Spec says that If the '#' flag is present and the argument is not a Formattable , then a FormatFlagsConversionMismatchException should be thrown, but RI doesn't.

        FormatterTest.test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion(),Line1328 and 1333: error on RI, RI does not support converter 'C' and throws UnknownFormatConversionException.

        Please try this patch, thanks a lot.

        Show
        Paulex Yang added a comment - The format() is partly implemented in this patch, the integer/float/data format feature is not included because this patch is not small already. I'll attach the features left if this one is acceptted. There are some tests fail on RI, and I consider they are RI's bugs, as below: FomatterTest.test_formatLjava_lang_String$Ljava_lang_Object_Percent(), Line1062: error on RI, specification says FormatFlagsConversionMismatchException should be thrown but RI throw IllegalFormatFlagsException. FomatterTest.test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversion(), Line1257: fail on RI. Spec says that If the '#' flag is present and the argument is not a Formattable , then a FormatFlagsConversionMismatchException should be thrown, but RI doesn't. FormatterTest.test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion(),Line1328 and 1333: error on RI, RI does not support converter 'C' and throws UnknownFormatConversionException. Please try this patch, thanks a lot.
        Paulex Yang made changes -
        Field Original Value New Value
        Attachment 01.harmony455.diff [ 12334616 ]
        Mikhail Loenko made changes -
        Assignee Mikhail Loenko [ mloenko ]
        Hide
        Mikhail Loenko added a comment -

        applied to revision 410036

        Transformer.locale is never used (comment says it will be in new feature); kept it there

        Richard please verify that it was done as expected

        Show
        Mikhail Loenko added a comment - applied to revision 410036 Transformer.locale is never used (comment says it will be in new feature); kept it there Richard please verify that it was done as expected
        Mikhail Loenko made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Paulex Yang added a comment -

        looks fine, thank you, Mikhail. And for your information, the Transformer.locale will be used in the coming date format feature.

        Show
        Paulex Yang added a comment - looks fine, thank you, Mikhail. And for your information, the Transformer.locale will be used in the coming date format feature.
        Hide
        Richard Liang added a comment -

        Thanks Mikhail,

        The fix looks good.

        Show
        Richard Liang added a comment - Thanks Mikhail, The fix looks good.
        Hide
        Mikhail Loenko added a comment -

        verified by Richard

        Show
        Mikhail Loenko added a comment - verified by Richard
        Mikhail Loenko made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        18d 22h 59m 1 Mikhail Loenko 29/May/06 14:56
        Resolved Resolved Closed Closed
        23h 28m 1 Mikhail Loenko 30/May/06 14:24

          People

          • Assignee:
            Mikhail Loenko
            Reporter:
            Richard Liang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development