implementation violates javadoc for setDataContenHandlerFactory

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.0fcs
    • Affects Version/s: alpha
    • Component/s: other-libs
    • None
    • 1.0fcs
    • generic
    • solaris_2.6
    • Verified

        The javadoc for static method setDataContentHandlerFactory makes it clear, that using this call overrides any other possible source for deriving a DataContentHandler.

        However, if a DataHandler has been created, and any method which uses a DataContentHandler (ie which causes the private method getDataContentHandler, to be called) has been called, then a subsequent call to the static method setDataContentHandlerFactory will not effect this DataHandler, because the first line of code in getDataContentHandler is:

        if (dataContentHandler != null)
        return dataContentHandler;

        Besides violating the spec for setDataContentHandlerFactory, a more subtle issue is that this makes the the resulting behavior somewhat non-deterministic in relationship to the documentation. There's no defined semantic for when calling setDataContentHandlerFactory ceases to affect any given existing DataHandler instance.



              Assignee:
              J. Duke
              Reporter:
              J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: