Neeraj Bajaj wrote:
>         i am submitting a patch for bug 3191.

I don't have time at the moment to look at this patch. I'll
look at it more in depth once I'm done with a few things
first.

> 2. NamespaceSupport:getUri(String prefix)
> 
> changed the  string equality comparison in this method
> from
>             if (fNamespace[i - 2] == prefix)
> to
>         if (fNamespace[i - 2].equals(prefix)).

However, this change looks like it should be rejected. In
Xerces2, the standard components rely on a SymbolTable to
re-use the same String object reference for lexically
equivalent strings that are commonly used. Since element
QNames, attribute QNames, and namespace URIs are symbols,
we are guaranteed to be able to do a reference comparison.

Therefore, we don't need to waste time calling the equals
method. If it *doesn't* work even though the strings are
indeed lexically equivalent, then we need to track down
the source of the problem in the components and not just
cover up the problem in the NamespaceSupport class.

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to