RFR: 8061785: [TEST_BUG] serviceability/sa/jmap-hashcode/Test8028623.java has utf8 character corrupted by earlier merge

KEVIN WALLS kevin.walls at oracle.com
Mon Nov 24 11:43:35 UTC 2014


Hi,

I'd like to request approval to push this small proactive change to a 
test into

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/hotspot


The test contains an embedded utf8 character, to test a jmap/SA heap 
dumping fix.  The test is not broken here in 7u-dev, but in another 
clone I saw this character get corrupted by a merge: it was rewritten as 
literal ?? question marks.   To avoid the same thing happening again we 
can change it to a \uXXXX format.

The change below I tested to check the test still correctly fails on a 
non-fixed JVM, and passes on a fixed one (original issue: 
https://bugs.openjdk.java.net/browse/JDK-8028623).

bug:
https://bugs.openjdk.java.net/browse/JDK-8061785

change:

$ hg diff
diff --git a/test/serviceability/sa/jmap-hashcode/Test8028623.java 
b/test/serviceability/sa/jmap-hashcode/Test8028623.java
--- a/test/serviceability/sa/jmap-hashcode/Test8028623.java
+++ b/test/serviceability/sa/jmap-hashcode/Test8028623.java
@@ -38,12 +38,12 @@

  public class Test8028623 {

-  public static int à = 1;
+  public static int \u00CB = 1;
    public static String dumpFile = "heap.out";

    public static void main (String[] args) {

-    System.out.println(Ã);
+    System.out.println(\u00CB);

      try {
          int pid = ProcessTools.getProcessId();



----------------------------------------------------------------------------------------------
Thanks
Kevin


More information about the jdk7u-dev mailing list