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

Simplify creation of XMLGregorianCalendars

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 2.0
    • xml
    • generic
    • generic

      In any case I think DatatypeFactory is really poor both in terms of
      performance and usability. It's just ridiculous that you have to do
      this much:

      try {
         DatatypeFactory.newInstance().newXMLGregorianCalendar(...);
      } catch(DatatypeConfigurationException e) {
         // huh?
         assert false;
      }

      just to get a new XMLGregorianCalendar created.

      I think a better bug to file (instead of the performance bug) is to
      ask the JAXP API to deprecate this, and move the similar
      functionality to something like this:

         static XMLGregorianCalendar.create(....)

      ... which can use a singleton DatatypeFactory instance behind the
      scene. This is faster as well as easier to use.

            joehw Joe Wang
            spericas Santiago Pericasgeertsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: