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

Simplify creation of XMLGregorianCalendars

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: 5.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: