sjsxp
  1. sjsxp
  2. SJSXP-58

XMLEvent.getLocation() returns a volatile Location

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      58

      Description

      The XMLEvent getLocation() interface method has the following documentation:

      "Return the location of this event. The Location returned from this method is
      non-volatile and will retain its information."

      However, this is not true in the SJSXP implementation: the return value of
      XMLReaderImpl.getLocation() is stored in XMLEvent instances, and that Location
      object is volatile (only valid until next() is called).

        Activity

        Hide
        Joe Wang added a comment -

        reassign.

        Show
        Joe Wang added a comment - reassign.
        Hide
        Joe Wang added a comment -

        Fixed. Note that the change is made on StreamReader's getLocation method.
        Although the javadoc for the later did not state as clearly as XMLEvent
        getLocation, returning a location object that would change when the reader's
        next() is called is not desirable.

        This fix will be integrated into jaxp and recommended for future jdk6 update
        releases.

        Show
        Joe Wang added a comment - Fixed. Note that the change is made on StreamReader's getLocation method. Although the javadoc for the later did not state as clearly as XMLEvent getLocation, returning a location object that would change when the reader's next() is called is not desirable. This fix will be integrated into jaxp and recommended for future jdk6 update releases.

          People

          • Assignee:
            Joe Wang
            Reporter:
            dcitron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: