OpenJDK / portola / portola
changeset 27774:659f0511ec75
8065748: Add a test to verify that non ascii characters in Encodings.properties do not cause issues
Reviewed-by: joehw
author | dfuchs |
---|---|
date | Wed, 26 Nov 2014 20:10:48 +0100 |
parents | 938fb14f357a |
children | 4ee8b208017c c8bb28d30418 |
files | jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java Wed Nov 26 11:12:19 2014 -0800 +++ b/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java Wed Nov 26 20:10:48 2014 +0100 @@ -23,7 +23,7 @@ /** * @test - * @bug 8008738 + * @bug 8008738 8065138 * @summary checks that the mapping implemented by * com.sun.org.apache.xml.internal.serializer.Encodings * correctly identifies valid Charset names and @@ -64,6 +64,15 @@ props.load(is); } + if (!props.containsKey("UTF8")) { + // If the test fails here - it may indicate that you stumbled on an + // issue similar to that fixed by JDK-8065138. + // Check that the content of the Encodings.properties included in + // the tested build image matches the content of the file in the source + // jaxp tree of the jdk forest. + throw new RuntimeException("UTF8 key missing in " + ClassLoader.getSystemResource(ENCODINGS_FILE)); + } + //printAllCharsets(); test(props);