8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
Joe Wang
huizhe.wang at oracle.com
Thu Dec 13 21:46:05 UTC 2012
On 12/12/2012 2:35 AM, Alan Bateman wrote:
> On 12/12/2012 09:31, Paul Sandoz wrote:
>>
>> http://cr.openjdk.java.net/~alanb/8004371/webrev.02/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java.html
>>
>>
>> Why are the element qualified names compared ignoring case?
> I'll leave this to Joe, but I agree that it doesn't look right.
What I was thinking?! I had the property dtd in mind that requires the
elements all be in lower cases, so therefore I should ignore case and
allow it -- any better logic than that? :-)
Fixed now. And also added a couple of test cases. Elements with wrong
case would still have been rejected, but the error messages would be
different.
>
>>
>> We need tests with invalid documents. I did not check if there are
>> already such tests present.
I added some test cases to test validation, compatibility and etc. Alan
thinks we'll use the ones currently in the JDK repository for now.
Thanks,
Joe
>>
> Tests for properties in XML format are in short supply, at least in
> the jdk repository. There are tests in other test suites (JCK for
> example) but we may need to add additional tests to give this new code
> a good workout. The awkward thing is that this code will not be
> executed with by the regular JDK, hence the update to the
> LoadAndStoreXML.java test to at least ensure that it executed during
> normal test runs.
>
> -Alan
More information about the core-libs-dev
mailing list