8065748: Add a test to verify that non ascii characters in Encodings.properties do not cause issues
Reviewed-by: joehw
--- 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);