Skip to content

Commit

Permalink
Merge branch 'upstream-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Datadog Syncup Service committed May 22, 2024
2 parents 88bc754 + 7bcaeb5 commit 2e63dad
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 22 deletions.
49 changes: 49 additions & 0 deletions jdk/make/data/charsetmapping/IBM943.c2b
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# source: 34B003AF.RPMAP130
# c->b only entries
#
815C 2015
8160 FF5E
8161 2225
817C FF0D
88A0 555E
898B 7130
89A8 9DD7
8A9A 5699
8BA0 4FE0
8BEB 8EC0
8C71 7E6B
8C74 8346
8CB2 9E7C
8D8D 9EB4
8DF2 6805
8EC6 5C62
8F4A 7E61
8FD3 8523
8FDD 91AC
90E4 87EC
917E 6414
9189 7626
91CB 9A52
925C 7C1E
92CD 6451
9355 5861
935E 985A
9398 79B1
93C0 7006
9458 56CA
948D 525D
94AC 6F51
94AE 91B1
966A 9830
96CB 9EB5
9789 840A
9858 881F
9BA0 5C5B
9DB7 6522
9E94 688E
E379 7E48
E445 8141
E8F6 9839
FA55 FFE4
FA59 F86F
5 changes: 0 additions & 5 deletions jdk/test/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,4 @@ sample/chatserver/ChatTest.java 8178912 generic-all

############################################################################
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#certignarootca 8331883 generic-all
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#globalsigneccrootcar4 8328825 generic-all
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#gtsrootcar1 8328825 generic-all
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#gtsrootcar2 8328825 generic-all
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#gtsrootecccar3 8328825 generic-all
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#gtsrootecccar4 8328825 generic-all
security/infra/java/security/cert/CertPathValidator/certification/LuxTrustCA.java 8314509 generic-all
8 changes: 4 additions & 4 deletions jdk/test/java/beans/XMLEncoder/Test4625418.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -23,7 +23,7 @@

/*
* @test
* @bug 4625418
* @bug 4625418 8239965
* @summary Tests XML <a href="http://download.java.net/jdk6/docs/technotes/guides/intl/encoding.doc.html">encoding</a>
* @author Sergey Malenkov
* @run main/timeout=360 Test4625418
Expand Down Expand Up @@ -126,7 +126,7 @@ public final class Test4625418 implements ExceptionListener {
//"Cp939",
//"Cp942",
//"Cp942C",
"Cp943",
//"Cp943",
//"Cp943C",
"Cp948",
"Cp949",
Expand Down Expand Up @@ -307,7 +307,7 @@ public final class Test4625418 implements ExceptionListener {
//"x-IBM939",
//"x-IBM942",
//"x-IBM942C",
"x-IBM943",
//"x-IBM943",
//"x-IBM943C",
"x-IBM948",
"x-IBM949",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@
* @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop globalsigneccrootcar4 OCSP
* @run main/othervm -Djava.security.debug=certpath CAInterop globalsigneccrootcar4 CRL
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop globalsigneccrootcar4 DEFAULT
*/

/*
Expand All @@ -217,8 +216,7 @@
* @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootcar1 OCSP
* @run main/othervm -Djava.security.debug=certpath CAInterop gtsrootcar1 CRL
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootcar1 DEFAULT
*/

/*
Expand All @@ -227,8 +225,7 @@
* @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootcar2 OCSP
* @run main/othervm -Djava.security.debug=certpath CAInterop gtsrootcar2 CRL
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootcar2 DEFAULT
*/

/*
Expand All @@ -237,8 +234,7 @@
* @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootecccar3 OCSP
* @run main/othervm -Djava.security.debug=certpath CAInterop gtsrootecccar3 CRL
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootecccar3 DEFAULT
*/

/*
Expand All @@ -247,8 +243,7 @@
* @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootecccar4 OCSP
* @run main/othervm -Djava.security.debug=certpath CAInterop gtsrootecccar4 CRL
* @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop gtsrootecccar4 DEFAULT
*/

/*
Expand Down
64 changes: 61 additions & 3 deletions jdk/test/sun/nio/cs/TestIBMBugs.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -22,13 +22,13 @@
*/

/* @test
@bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466
@summary Check if the problems reported in above bugs have been fixed
@bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466 8235834
*/

import java.io.*;
import java.nio.*;
import java.nio.charset.*;
import java.util.Arrays;

public class TestIBMBugs {

Expand Down Expand Up @@ -172,6 +172,63 @@ private static void bug6577466 () throws Exception {
}
}

// Following test data is for 8235834
private static final byte[] byteIBM943c2b = new byte[] {
(byte)0x81, (byte)0x5C, (byte)0x81, (byte)0x60,
(byte)0x81, (byte)0x61, (byte)0x81, (byte)0x7C,
(byte)0x88, (byte)0xA0, (byte)0x89, (byte)0x8B,
(byte)0x89, (byte)0xA8, (byte)0x8A, (byte)0x9A,
(byte)0x8B, (byte)0xA0, (byte)0x8B, (byte)0xEB,
(byte)0x8C, (byte)0x71, (byte)0x8C, (byte)0x74,
(byte)0x8C, (byte)0xB2, (byte)0x8D, (byte)0x8D,
(byte)0x8D, (byte)0xF2, (byte)0x8E, (byte)0xC6,
(byte)0x8F, (byte)0x4A, (byte)0x8F, (byte)0xD3,
(byte)0x8F, (byte)0xDD, (byte)0x90, (byte)0xE4,
(byte)0x91, (byte)0x7E, (byte)0x91, (byte)0x89,
(byte)0x91, (byte)0xCB, (byte)0x92, (byte)0x5C,
(byte)0x92, (byte)0xCD, (byte)0x93, (byte)0x55,
(byte)0x93, (byte)0x5E, (byte)0x93, (byte)0x98,
(byte)0x93, (byte)0xC0, (byte)0x94, (byte)0x58,
(byte)0x94, (byte)0x8D, (byte)0x94, (byte)0xAC,
(byte)0x94, (byte)0xAE, (byte)0x96, (byte)0x6A,
(byte)0x96, (byte)0xCB, (byte)0x97, (byte)0x89,
(byte)0x98, (byte)0x58, (byte)0x9B, (byte)0xA0,
(byte)0x9D, (byte)0xB7, (byte)0x9E, (byte)0x94,
(byte)0xE3, (byte)0x79, (byte)0xE4, (byte)0x45,
(byte)0xE8, (byte)0xF6, (byte)0xFA, (byte)0x55,
(byte)0xFA, (byte)0x59,
};

private static final String strIBM943c2b1 =
"\u2015\uFF5E\u2225\uFF0D\u555E\u7130\u9DD7\u5699" +
"\u4FE0\u8EC0\u7E6B\u8346\u9E7C\u9EB4\u6805\u5C62" +
"\u7E61\u8523\u91AC\u87EC\u6414\u7626\u9A52\u7C1E" +
"\u6451\u5861\u985A\u79B1\u7006\u56CA\u525D\u6F51" +
"\u91B1\u9830\u9EB5\u840A\u881F\u5C5B\u6522\u688E" +
"\u7E48\u8141\u9839\uFFE4\uF86F";

private static final String strIBM943c2b2 =
"\u2014\u301C\u2016\u2212\u5516\u7114\u9D0E\u565B" +
"\u4FA0\u8EAF\u7E4B\u834A\u9E78\u9EB9\u67F5\u5C61" +
"\u7E4D\u848B\u91A4\u8749\u63BB\u75E9\u9A28\u7BAA" +
"\u63B4\u586B\u985B\u7977\u6D9C\u56A2\u5265\u6E8C" +
"\u9197\u982C\u9EBA\u83B1\u874B\u5C4F\u6505\u688D" +
"\u7E66\u80FC\u983D\u00A6\u2116";

private static void bug8235834 () throws Exception {
// 8235834 affects IBM-943 and IBM-943C encoder.
// The decoded results of the corresponding characters of IBM-943
// and IBM-943C is the same.
for (String csName : new String[] {"x-IBM943", "x-IBM943C"}) {
Charset cs = Charset.forName(csName);
if (!Arrays.equals(byteIBM943c2b, strIBM943c2b1.getBytes(cs))) {
throw new Exception(csName+" failed to encode");
}
if (!strIBM943c2b2.equals(new String(byteIBM943c2b, cs))) {
throw new Exception(csName+" failed to round-trip conversion");
}
}
}
public static void main (String[] args) throws Exception {
bug6577466();
// need to be tested before any other IBM949C test case
Expand All @@ -182,5 +239,6 @@ public static void main (String[] args) throws Exception {
bug6371619();
bug6371431();
bug6569191();
bug8235834();
}
}

0 comments on commit 2e63dad

Please sign in to comment.