Hi Ishan, Though I was not present when this decision was taken (i.e to use interned values of strings across Xerces).
As Michael explained that this is there in Xerces for performance reasons. Which means that '==' check on interned strings (which is essentially a canonical value of the string in the JVM) performs better than String.equals check on non interned strings. Personally speaking, I'm ok with this principle followed in Xerces, as it causes real performance benefit :) On Mon, Jul 26, 2010 at 5:14 PM, Ishan Jayawardena <[email protected]> wrote: > Hi Michael and Mukul, > Actually, while I was developing the SCD parser, I came across this > same problem that Mukul had. I was using these getURI() and > declarePrefix() methods and I couldn't get the code working until I > changed the input parameters into interened parameters, which I did > without any underlying details about those methods as a result of a > long trial and error process. But I guess this is not a very good > characteristic of the API and instead we have to tell the programmers > explicitly that when using such methods, they are supposed to pass > interned parameters. WDYT? > Thanks. -- Regards, Mukul Gandhi --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
