Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8254654

java.text.MessageFormat method format, line 1272 can't work with LocalDate

    XMLWordPrintable

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      java.text.MessageFormat

      the method: MessageFormat.format
      see line 1272

       private StringBuffer subformat
      ....
      } else if (obj instanceof Number) {
                          // format number if can
                          subFormatter = NumberFormat.getInstance(locale);
                      } else if (obj instanceof Date) {
                          // format a Date if can
                          subFormatter = DateFormat.getDateTimeInstance(
                                   DateFormat.SHORT, DateFormat.SHORT, locale);//fix
                      } else if (obj instanceof String) {
                          arg = (String) obj;

                      }
      ...

      can't work with java.time.LocalDate and java.time.LocalDateTime
      only with old java.util.Date


      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            naoto Naoto Sato
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: