JDK-8213325 : (props) Properties.loadFromXML does not fully comply with the spec
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 8,9,10,11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-11-02
  • Updated: 2020-03-27
  • Resolved: 2018-12-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.5-oracleFixed 12 b23Fixed
Related Reports
CSR :  
Relates :  
Sub Tasks
JDK-8214820 :  
Description
The small footprint XML parser accepts XML documents that may not be compliant with the requirement as specified in java.util.Properties.loadFromXML. This should be fixed since the file format should be consistent between loadFromXML and its corresponding method storeToXML���.

Comments
This is waiting for review here: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010081.html
07-10-2019

No problem, Roman. Good to know you're able to get that fixed with a small change and pass all tests.
20-08-2019

Thanks, Joe. As far as I can tell, the JAXP parser already checks most of the stuff that has been added to the ukit parser. I made one little modification that checks that no internal DTD is supplied. The rest should be checked by actual DTD validation. http://cr.openjdk.java.net/~rkennke/JDK-8213325/webrev.01/ This passes all relevant tests, esp. the new regression tests.
20-08-2019

Hi Roman, there is no need to expand the fix to PlatformXmlPropertiesProvider or the JAXP parser. The original fix was for the small footprint parser and we should stay focused on that for the backport. The impl with the JAXP parser resulted in a less perfect (not as strict as far as following the spec goes) situation, but it worked fine and has been that way since the very beginning. So I think we shall leave it as is, esp. at this stage of JDK 8. We've moved on with the small parser in the current JDK. So please keep the narrow scope for the backport, compact1/small parser. And, please coordinate with Aleksej on this issue. Thanks.
20-08-2019

Ok. I'll look into re-doing the equivalent fix in PlatformXmlPropertiesProvider then.
20-08-2019

Unless something has significantly changed, the small footprint parser in JDK 8 is only used in compact1 build (`make profiles`). I think the CSR for (Oracle) 8u231 needs to be re-examined as it reads like it changes behavior of the loadFromXML API in JDK builds when I assume it only impacts the implementation in embedded builds. Update: I discussed briefly with Aleksej. The switch to the ukit parser involves behahvior changes (esp. with IBM encodings) so it's not appropriate for an update release. If an equivalent change is needed in 8u then sun.util.xml.PlatformXmlPropertiesProvider is the place to start.
19-08-2019

JDK8u backport review: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010054.html
16-08-2019

Fix request(11u): Requesting backport of this fix to OpenJDK 11 updates because it's part of Oracle 11.0.5. Patch applies cleanly after predecessor JDK-8210408 was applied. Testing in SAP env shows no regressions.
12-07-2019