8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present

Alan Bateman Alan.Bateman at oracle.com
Wed Dec 12 10:35:42 UTC 2012


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.

>
> http://cr.openjdk.java.net/~alanb/8004371/webrev.02/src/share/classes/java/util/Properties.java.sdiff.html
>
> What if there is a ServiceConfigurationError thrown in loadProviderAsService?
>
> Need to be very careful of errors on static initialization of the Properties class.
This is a JDK-internal interface so if there is a SCE it probably means 
the JDK is broken. So the only change here is really just to hook in the 
fallback implementation. In the short term this will only be used for 
the smallest profile. Once we go to modules then we have a choice as to 
whether to put it into its own module or just keep it in the base module.


> :
>
>
> We need tests with invalid documents. I did not check if there are already such tests present.
>
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