Hi Kohsuke,
First of all, thank you for cleaning up the code and fixing the bugs.
But I do not like that you removed the reuse of a DOMErrorImpl. I do not
think that reusing the DOMError is *the root of all evil* :). The DOM Spec.
does let user know that this object can be reused:
[[
This object may be reused by the DOM implementation across multiple calls
to the handleError method
]]
So I don't see any technical reson for removing this optimization. In my
personal view, all little things eventually end up. So we better optimize
the things we can, than wait for a specific complain from users that we
create too many objects in the DOM in error situations.
So unless you have a good reason why it is evil to reuse DOMError :), I
suggest we add the re-use back.
Thank you,
--
Elena Litani/ IBM Toronto
Friday, November 07, 2003 6:01 PM
To: [EMAIL PROTECTED]
cc:
From: "K.Kawaguchi" <[EMAIL PROTECTED]>
Subject: Patch submission
The attached patch to DOMNormalizer fixes the following problems:
- a bug in DOMNormalizer where "]]>" in CDATA section is not reported as
a warning.
- a bug in handling CDATA section normalization where the CDATA section
has siblings.
- a very small javadoc elaboration on fErrorHandler.
- a bug in gracefully aborting the normalization per user request.
- modified "modifyDOMError" to "reportDOMError" to make the error
reporting simpler.
- this could be controversial, but I removed the reuse of a DOMErrorImpl
object. As Knuth said, premature optimization is the root of all evil,
and since this is error reporting, I really don't see how this tiny
performance gain is worth cluttering the code.
This is the first time I submit a patch to Xerces, so please let me know
if there's anything I can improve.
regards,
----------------------
Kohsuke Kawaguchi
E-Mail: [EMAIL PROTECTED]
(See attached file: DOMNormalizer.patch)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
(Attachments removed)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]