diff -Nru openjdk-lts-11.0.21+9/.jcheck/conf openjdk-lts-11.0.22+7/.jcheck/conf --- openjdk-lts-11.0.21+9/.jcheck/conf 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/.jcheck/conf 2024-01-09 21:19:49.000000000 +0000 @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=11.0.21 +version=11.0.22 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace diff -Nru openjdk-lts-11.0.21+9/debian/changelog openjdk-lts-11.0.22+7/debian/changelog --- openjdk-lts-11.0.21+9/debian/changelog 2023-10-19 07:52:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/changelog 2024-01-20 10:27:19.000000000 +0000 @@ -1,10 +1,57 @@ -openjdk-lts (11.0.21+9-0ubuntu1~23.10) mantic-security; urgency=medium +openjdk-lts (11.0.22+7-0ubuntu2~23.10.1) mantic-security; urgency=medium + + * No-change rebuild to correct the previous changelog entry (LP: #2050390) + + * Upload to Ubuntu 23.10 + + -- Pushkar Kulkarni Sat, 20 Jan 2024 15:57:19 +0530 + +openjdk-lts (11.0.22+7-0ubuntu1) noble; urgency=medium + + * OpenJDK 11.0.22 release, build 7 + - CVEs: + + CVE-2024-20918 + + CVE-2024-20919 + + CVE-2024-20921 + + CVE-2024-20945 + + CVE-2024-20952 + - Security fixes: + + JDK-8308204: Enhanced certificate processing. + + JDK-8314295: Enhance verification of verifier. + + JDK-8314307: Improve loop handling. + + JDK-8314468: Improve Compiler loops. + + JDK-8316976: Improve signature handling. + + JDK-8317547: Enhance TLS connection support. + + JDK-8314284: Enhance Nashorn performance (CVE-2024-20926). + Release notes: + https://www.oracle.com/java/technologies/javase/11-0-22-relnotes.html#R11_0_22 + * Merge changes from openjdk-11 11.0.22+7-1 (LP: #2049715) + [ Vladimir Petko ] + - Generate d/watch to cope with early access and release builds. + - d/rules: Trim trailing whitespaces from debian/control. + + [ Pushkar Kulkarni ] + - Minor improvements to the copyright-generator. + + [ Pushkar Kulkarni ] + - debian/copyright: Update copyrights and notices, using a generator script. + + [ Vladimir Petko ] + - d/copyright: Fix lintian warning. + + [ Matthias Klose ] + - d/copyright: Fix source location. + + -- Pushkar Kulkarni Thu, 18 Jan 2024 13:52:07 +0530 + +openjdk-lts (11.0.21+9-0ubuntu1) noble; urgency=medium * OpenJDK 11.0.21 release, build 9. - CVE-2023-22081. - Release notes: https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-October/026351.html * d/source/lintian.overrides: use openjdk-lts package name. + * Disable jtreg tests on RISC-V due to the infrastructure issue. * Merge changes from openjdk-11 11.0.21+9-1 (LP: #2039754). - d/test: update problemlist. - d/p: drop exclude-broken-tests.patch. @@ -21,10 +68,7 @@ [ Pushkar Kulkarni ] - Handle limited ECC capabilities of NSS on older releases. - [ Vladimir Petko ] - * Upload to Ubuntu 23.10. - - -- Vladimir Petko Thu, 19 Oct 2023 20:52:28 +1300 + -- Vladimir Petko Thu, 26 Oct 2023 16:16:27 +1300 openjdk-lts (11.0.20+8-1ubuntu1) mantic; urgency=high diff -Nru openjdk-lts-11.0.21+9/debian/control openjdk-lts-11.0.22+7/debian/control --- openjdk-lts-11.0.21+9/debian/control 2023-10-19 07:52:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/control 2024-01-20 10:27:19.000000000 +0000 @@ -14,7 +14,7 @@ openjdk-11-jdk-headless:native | openjdk-10-jdk-headless:native, libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, libxrandr-dev, libelf-dev, libfontconfig1-dev, libgtk2.0-0 | libgtk-3-0, libharfbuzz-dev, libffi-dev, - zlib1g-dev:native, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, + zlib1g-dev:native, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, libnss3-dev (>= 2:3.17.1), openjdk-11-jdk-headless , Build-Depends-Indep: graphviz, pandoc, diff -Nru openjdk-lts-11.0.21+9/debian/copyright openjdk-lts-11.0.22+7/debian/copyright --- openjdk-lts-11.0.21+9/debian/copyright 2023-10-19 02:48:32.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/copyright 2024-01-20 10:27:19.000000000 +0000 @@ -20,76 +20,386 @@ src/java.desktop/share/native/libjavajpeg/README Source: https://github.com/openjdk/jdk11u Comment: - ------------------------------------------------------------------------------ - This package was debianized by Matthias Klose on - Wed, 08 Aug 2007 15:55:39 +0200. - ------------------------------------------------------------------------------ Upstream Authors: OpenJDK: - Sun Microsystems, Inc. - Oracle and/or its affiliates. - Packaging: - Matthias Klose - ------------------------------------------------------------------------------ + Oracle and/or its affiliates + Sun Microsystems, Inc + Red Hat, Inc + SAP SE + Azul Systems, Inc + Apache Software Foundation + Microsoft Corporation + Intel Corportation + IBM Corporation + Google LLC + Amazon.com, Inc + Other contributors + See the third party licenses below. + Packaged by: + Matthias Klose Files: * Copyright: - OpenJDK: - Copyright © 1996-2007 Sun Microsystems, Inc. - Copyright © 1996-2023 Oracle and/or its affiliates. - For third party copyrights see below (copies from the third party readme). - Portions Copyright © 1993-2014 IBM Corp. - Portions Copyright © 1997 Eastman Kodak Company. - Portions Copyright © 1999-2005 The Apache Software Foundation. - ------------------------------------------------------------------------------ -License: GPL with the Classpath exception - NOTE: the combined work which includes the upstream components below - carries forward the OpenJDK Assembly Exception (text included below). - . - OpenJDK: - OpenJDK is licensed under the GPL v2 with exceptions, - see `/usr/share/common-licenses/GPL-2'. - The exceptions are: - - "CLASSPATH" EXCEPTION TO THE GPL - - OPENJDK ASSEMBLY EXCEPTION - Various third party code in OpenJDK is licensed under different licenses. - . - Java Access Bridge: - Java Access Bridge is licensed under the LGPL v2. - See `/usr/share/common-licenses/LGPL-2'. - . - A Note About License Headers - ---------------------------- - . - Some sources downloaded from openjdk.java.net do not display the GPL - license header. Instances are: - . - - The files in openjdk/j2se/src/share/classes/javax/xml/stream/ seem to - comprise the BEA-StAX source code - . - http://ftpna2.bea.com/pub/downloads/jsr173.jar - . - with some Sun-specific modifications. We're assuming that Sun is - bundling BEA-StAX under the terms of the Apache License 2.0 and - that the modifications are owned by Sun. - . - - We are assuming that these files are owned by Sun: - openjdk/j2se/src/share/classes/**/resources/*.properties - . - The downloaded sources include a script that inserts proprietary - license headers into the source files it generates. The script - itself is GPL'd so we patched them to emit the GPL header. The - file is: - openjdk/j2se/make/java/nio/genExceptions.sh + Copyright (c) 1996-2023 Oracle and/or its affiliates. + Copyright (c) 1996-2003 Sun Microsystems, Inc. + Copyright (c) 2009-2012 Red Hat, Inc. + Copyright (c) 2012-2022 SAP SE. + Copyright (c) 2020-2021 Azul Systems, Inc. + Copyright (c) 1999-2022 The Apache Software Foundation. + Copyright (c) 2020-2021 Microsoft Corporation + Copyright (c) 2009-2022 Google LLC + Copyright (c) 2020-2021 Amazon.com, Inc + Copyright (c) 2021 Alibaba Group Holding Limited + Copyright (c) 2019-2021 Huawei Technologies Co. Ltd. + Copyright (c) 2021-2023 BELLSOFT + Copyright (c) 2022-23 THL A29 Limited, a Tencent company. + Copyright (c) 2021-2023, Arm Limited. + Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn. + Copyright (c) 2017 Instituto de Pesquisas Eldorado. + Copyright (c) 1999-2007 Brian Paul. + Copyright (c) 2018-2019 Adobe Inc. + Copyright 2006-2014 Adobe Systems Incorporated. + Copyright 1994-2011 Hewlett-Packard Co. + Portions Copyright (c) 2011-2014 IBM Corporation + Portions Copyright (c) 1995 Colin Plumb + Portions Copyright (c) 1997-2003 Eastman Kodak Company + See other third party notices under the License section +License: GPL with Classpath exception + . + --- begin of LICENSE --- + . + The GNU General Public License (GPL) + . + Version 2, June 1991 + . + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + . + Everyone is permitted to copy and distribute verbatim copies of this license + document, but changing it is not allowed. + . + Preamble + . + The licenses for most software are designed to take away your freedom to share + and change it. By contrast, the GNU General Public License is intended to + guarantee your freedom to share and change free software--to make sure the + software is free for all its users. This General Public License applies to + most of the Free Software Foundation's software and to any other program whose + authors commit to using it. (Some other Free Software Foundation software is + covered by the GNU Library General Public License instead.) You can apply it to + your programs, too. + . + When we speak of free software, we are referring to freedom, not price. Our + General Public Licenses are designed to make sure that you have the freedom to + distribute copies of free software (and charge for this service if you wish), + that you receive source code or can get it if you want it, that you can change + the software or use pieces of it in new free programs; and that you know you + can do these things. + . + To protect your rights, we need to make restrictions that forbid anyone to deny + you these rights or to ask you to surrender the rights. These restrictions + translate to certain responsibilities for you if you distribute copies of the + software, or if you modify it. + . + For example, if you distribute copies of such a program, whether gratis or for + a fee, you must give the recipients all the rights that you have. You must + make sure that they, too, receive or can get the source code. And you must + show them these terms so they know their rights. + . + We protect your rights with two steps: (1) copyright the software, and (2) + offer you this license which gives you legal permission to copy, distribute + and/or modify the software. + . + Also, for each author's protection and ours, we want to make certain that + everyone understands that there is no warranty for this free software. If the + software is modified by someone else and passed on, we want its recipients to + know that what they have is not the original, so that any problems introduced + by others will not reflect on the original authors' reputations. + . + Finally, any free program is threatened constantly by software patents. We + wish to avoid the danger that redistributors of a free program will + individually obtain patent licenses, in effect making the program proprietary. + To prevent this, we have made it clear that any patent must be licensed for + everyone's free use or not licensed at all. + . + The precise terms and conditions for copying, distribution and modification + follow. + . + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + . + 0. This License applies to any program or other work which contains a notice + placed by the copyright holder saying it may be distributed under the terms of + this General Public License. The "Program", below, refers to any such program + or work, and a "work based on the Program" means either the Program or any + derivative work under copyright law: that is to say, a work containing the + Program or a portion of it, either verbatim or with modifications and/or + translated into another language. (Hereinafter, translation is included + without limitation in the term "modification".) Each licensee is addressed as + "you". + . + Activities other than copying, distribution and modification are not covered by + this License; they are outside its scope. The act of running the Program is + not restricted, and the output from the Program is covered only if its contents + constitute a work based on the Program (independent of having been made by + running the Program). Whether that is true depends on what the Program does. + . + 1. You may copy and distribute verbatim copies of the Program's source code as + you receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice and + disclaimer of warranty; keep intact all the notices that refer to this License + and to the absence of any warranty; and give any other recipients of the + Program a copy of this License along with the Program. + . + You may charge a fee for the physical act of transferring a copy, and you may + at your option offer warranty protection in exchange for a fee. + . + 2. You may modify your copy or copies of the Program or any portion of it, thus + forming a work based on the Program, and copy and distribute such modifications + or work under the terms of Section 1 above, provided that you also meet all of + these conditions: + . + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + . + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + . + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + . + These requirements apply to the modified work as a whole. If identifiable + sections of that work are not derived from the Program, and can be reasonably + considered independent and separate works in themselves, then this License, and + its terms, do not apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a whole which is a + work based on the Program, the distribution of the whole must be on the terms + of this License, whose permissions for other licensees extend to the entire + whole, and thus to each and every part regardless of who wrote it. + . + Thus, it is not the intent of this section to claim rights or contest your + rights to work written entirely by you; rather, the intent is to exercise the + right to control the distribution of derivative or collective works based on + the Program. + . + In addition, mere aggregation of another work not based on the Program with the + Program (or with a work based on the Program) on a volume of a storage or + distribution medium does not bring the other work under the scope of this + License. + . + 3. You may copy and distribute the Program (or a work based on it, under + Section 2) in object code or executable form under the terms of Sections 1 and + 2 above provided that you also do one of the following: + . + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + . + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + . + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + . + The source code for a work means the preferred form of the work for making + modifications to it. For an executable work, complete source code means all + the source code for all modules it contains, plus any associated interface + definition files, plus the scripts used to control compilation and installation + of the executable. However, as a special exception, the source code + distributed need not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, kernel, and so on) + of the operating system on which the executable runs, unless that component + itself accompanies the executable. + . + If distribution of executable or object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the source + code from the same place counts as distribution of the source code, even though + third parties are not compelled to copy the source along with the object code. + . + 4. You may not copy, modify, sublicense, or distribute the Program except as + expressly provided under this License. Any attempt otherwise to copy, modify, + sublicense or distribute the Program is void, and will automatically terminate + your rights under this License. However, parties who have received copies, or + rights, from you under this License will not have their licenses terminated so + long as such parties remain in full compliance. + . + 5. You are not required to accept this License, since you have not signed it. + However, nothing else grants you permission to modify or distribute the Program + or its derivative works. These actions are prohibited by law if you do not + accept this License. Therefore, by modifying or distributing the Program (or + any work based on the Program), you indicate your acceptance of this License to + do so, and all its terms and conditions for copying, distributing or modifying + the Program or works based on it. + . + 6. Each time you redistribute the Program (or any work based on the Program), + the recipient automatically receives a license from the original licensor to + copy, distribute or modify the Program subject to these terms and conditions. + You may not impose any further restrictions on the recipients' exercise of the + rights granted herein. You are not responsible for enforcing compliance by + third parties to this License. + . + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), conditions + are imposed on you (whether by court order, agreement or otherwise) that + contradict the conditions of this License, they do not excuse you from the + conditions of this License. If you cannot distribute so as to satisfy + simultaneously your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the Program at all. + For example, if a patent license would not permit royalty-free redistribution + of the Program by all those who receive copies directly or indirectly through + you, then the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program. + . + If any portion of this section is held invalid or unenforceable under any + particular circumstance, the balance of the section is intended to apply and + the section as a whole is intended to apply in other circumstances. + . + It is not the purpose of this section to induce you to infringe any patents or + other property right claims or to contest validity of any such claims; this + section has the sole purpose of protecting the integrity of the free software + distribution system, which is implemented by public license practices. Many + people have made generous contributions to the wide range of software + distributed through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing to + distribute software through any other system and a licensee cannot impose that + choice. + . + This section is intended to make thoroughly clear what is believed to be a + consequence of the rest of this License. + . + 8. If the distribution and/or use of the Program is restricted in certain + countries either by patents or by copyrighted interfaces, the original + copyright holder who places the Program under this License may add an explicit + geographical distribution limitation excluding those countries, so that + distribution is permitted only in or among countries not thus excluded. In + such case, this License incorporates the limitation as if written in the body + of this License. + . + 9. The Free Software Foundation may publish revised and/or new versions of the + General Public License from time to time. Such new versions will be similar in + spirit to the present version, but may differ in detail to address new problems + or concerns. + . + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any later + version", you have the option of following the terms and conditions either of + that version or of any later version published by the Free Software Foundation. + If the Program does not specify a version number of this License, you may + choose any version ever published by the Free Software Foundation. + . + 10. If you wish to incorporate parts of the Program into other free programs + whose distribution conditions are different, write to the author to ask for + permission. For software which is copyrighted by the Free Software Foundation, + write to the Free Software Foundation; we sometimes make exceptions for this. + Our decision will be guided by the two goals of preserving the free status of + all derivatives of our free software and of promoting the sharing and reuse of + software generally. + . + NO WARRANTY + . + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR + THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE + STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE + PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, + YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + . + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL + ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE + PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA + BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A + FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER + OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + . + END OF TERMS AND CONDITIONS + . + How to Apply These Terms to Your New Programs + . + If you develop a new program, and you want it to be of the greatest possible + use to the public, the best way to achieve this is to make it free software + which everyone can redistribute and change under these terms. + . + To do so, attach the following notices to the program. It is safest to attach + them to the start of each source file to most effectively convey the exclusion + of warranty; and each file should have at least the "copyright" line and a + pointer to where the full notice is found. + . + One line to give the program's name and a brief idea of what it does. + . + Copyright (C) + . + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + . + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + . + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + Also add information on how to contact you by electronic and paper mail. + . + If the program is interactive, make it output a short notice like this when it + starts in an interactive mode: + . + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + . + The hypothetical commands 'show w' and 'show c' should show the appropriate + parts of the General Public License. Of course, the commands you use may be + called something other than 'show w' and 'show c'; they could even be + mouse-clicks or menu items--whatever suits your program. + . + You should also get your employer (if you work as a programmer) or your school, + if any, to sign a "copyright disclaimer" for the program, if necessary. Here + is a sample; alter the names: + . + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + . + signature of Ty Coon, 1 April 1989 + . + Ty Coon, President of Vice + . + This General Public License does not permit incorporating your program into + proprietary programs. If your program is a subroutine library, you may + consider it more useful to permit linking proprietary applications with the + library. If this is what you want to do, use the GNU Library General Public + License instead of this License. + . . - ------------------------------------------------------------------------------ "CLASSPATH" EXCEPTION TO THE GPL . - Certain source files distributed by Sun Microsystems, Inc. are subject to - the following clarification and special exception to the GPL, but only where - Sun has expressly included in the particular source file's header the words - "Sun designates this particular file as subject to the "Classpath" exception - as provided by Sun in the LICENSE file that accompanied this code." + Certain source files distributed by Oracle America and/or its affiliates are + subject to the following clarification and special exception to the GPL, but + only where Oracle has expressly included in the particular source file's header + the words "Oracle designates this particular file as subject to the "Classpath" + exception as provided by Oracle in the LICENSE file that accompanied this code." . Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of @@ -106,95 +416,63 @@ the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + The following licenses for third party code are taken from 'legal' + directories of modules under src/ ------------------------------------------------------------------------------ - OPENJDK ASSEMBLY EXCEPTION . - The OpenJDK source code made available by Sun at openjdk.java.net and - openjdk.dev.java.net ("OpenJDK Code") is distributed under the terms of the - GNU General Public License version 2 - only ("GPL2"), with the following clarification and special exception. - . - Linking this OpenJDK Code statically or dynamically with other code - is making a combined work based on this library. Thus, the terms - and conditions of GPL2 cover the whole combination. - . - As a special exception, Sun gives you permission to link this - OpenJDK Code with certain code licensed by Sun as indicated at - http://openjdk.java.net/legal/exception-modules-2007-05-08.html - ("Designated Exception Modules") to produce an executable, - regardless of the license terms of the Designated Exception Modules, - and to copy and distribute the resulting executable under GPL2, - provided that the Designated Exception Modules continue to be - governed by the licenses under which they were offered by Sun. - . - As such, it allows licensees and sublicensees of Sun's GPL2 OpenJDK Code to - build an executable that includes those portions of necessary code that Sun - could not provide under GPL2 (or that Sun has provided under GPL2 with the - Classpath exception). If you modify or add to the OpenJDK code, that new - GPL2 code may still be combined with Designated Exception Modules if the - new code is made subject to this exception by its copyright holder. - . - ------------------------------------------------------------------------------ - OpenJDK Trademark Notice - Version 1.1, 2008/3/10 - . - OpenJDK (the "Name") is a trademark of Sun Microsystems, Inc. (the "Owner"). - Owner permits any person obtaining a copy of this software (the "Software") - which is based on original software retrieved from one of the following - websites: http://download.java.net/openjdk, http://hg.openjdk.java.net/jdk6, - or http://openjdk.java.net (each a "Website", with the original software made - available by the Owner on a Website being known as the "Website Software") to - use the Name in package names and version strings of the Software subject to - the following conditions: + %% This notice is provided with respect to Cryptix AES v3.2.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Cryptix General License . - - The Software is a substantially complete implementation of the OpenJDK - development kit or runtime environment code made available by Owner on a - Website, and the vast majority of the Software code is identical to the - upstream Website Software; . - - No permission is hereby granted to use the Name in any other manner, - unless such use constitutes "fair use." + Cryptix General License . - - The Owner makes no warranties of any kind respecting the Name and all - representations and warranties, including any implied warranty of - merchantability, fitness for a particular purpose or non-infringement - are hereby disclaimed; and + Copyright (c) 1995-2005 The Cryptix Foundation Limited. + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: . - - This notice and the following legend are included in all copies of the - Software or portions of it: + 1. Redistributions of source code must retain the copyright notice, + this list of conditions and the following disclaimer. . - OpenJDK is a trademark or registered trademark of Sun Microsystems, - Inc. in the United States and other countries. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. . - The Name may also be used in connection with descriptions of the Software that - constitute "fair use," such as "derived from the OpenJDK code base" or "based - on the OpenJDK source code." + THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND + CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . - Owner intends to revise this Notice as necessary in order to meet the needs of - the OpenJDK Community. Please send questions or comments about this Notice to - Sun Microsystems at openjdk-tm@sun.com. Revisions to this Notice will be - announced on the public mailing list announce@openjdk.java.net, to which you - may subscribe by visiting http://mail.openjdk.java.net. The latest version of - this Notice may be found at http://openjdk.java.net/legal. . - ------------------------------------------------------------------------------ . - The contents of the jdk/src/share/native/sun/security/ec/impl/ directory are - licensed under the LGPL-2.1. See `/usr/share/common-licenses/LGPL-2-1'. + --- end of LICENSE --- . ------------------------------------------------------------------------------ - The following licenses for third party code are taken from - openjdk/THIRD_PARTY_README - ------------------------------------------------------------------------------ + %% This notice is provided with respect to ASM Bytecode Manipulation Framework v6.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . - DO NOT TRANSLATE OR LOCALIZE. - ----------------------------- + --- begin of LICENSE --- . - %% This notice is provided with respect to ASM Bytecode Manipulation - Framework v5.0, which may be included with JRE 8, and JDK 8, and - OpenJDK 8. + ASM License . - --- begin of LICENSE --- . Copyright (c) 2000-2011 France Télécom All rights reserved. @@ -204,15 +482,15 @@ are met: . 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. . 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -226,155 +504,1448 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . + . + . --- end of LICENSE --- . ------------------------------------------------------------------------------ + %% This notice is provided with respect to c-libutl 20160225, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . - %% This notice is provided with respect to BSDiff v4.3, which may be - included with JRE 8, JDK 8, and OpenJDK 8. + --- begin of LICENSE --- + . + c-libutl License + . + . + This software is distributed under the terms of the BSD license. + . + == BSD LICENSE =============================================================== + . + (C) 2009 by Remo Dentato (rdentato@gmail.com) + . + . + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + . + http://opensource.org/licenses/bsd-license.php + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v33, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright 2003-2005 Colin Percival - All rights reserved + CLDR License + . + . + . + UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + Unicode Data Files include all data files under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + Unicode Data Files do not include PDF online code charts under the + directory http://www.unicode.org/Public/. + . + Software includes any source code published in the Unicode Standard + or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + NOTICE TO USER: Carefully read the following legal agreement. + BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S + DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), + YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. + IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE + THE DATA FILES OR SOFTWARE. + . + COPYRIGHT AND PERMISSION NOTICE + . + Copyright © 1991-2018 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + . + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. + . + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + . + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. . - Redistribution and use in source and binary forms, with or without - modification, are permitted providing that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ + %% This notice is provided with respect to International Components for Unicode (ICU4J) v60.2, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + ICU4J License + . + . + . + UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + Unicode Data Files include all data files under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + Unicode Data Files do not include PDF online code charts under the + directory http://www.unicode.org/Public/. + . + Software includes any source code published in the Unicode Standard + or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + NOTICE TO USER: Carefully read the following legal agreement. + BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S + DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), + YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. + IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE + THE DATA FILES OR SOFTWARE. + . + COPYRIGHT AND PERMISSION NOTICE + . + Copyright © 1991-2018 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + . + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. + . + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + . + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. + . . - %% This notice is provided with respect to CodeViewer 1.0, which may be - included with JDK 8. + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Mozilla Public Suffix List, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright 1999 by CoolServlets.com. + Public Suffix Notice . - Any errors or suggested improvements to this class can be reported as - instructed on CoolServlets.com. We hope you enjoy this program... your - comments will encourage further development! This software is distributed - under the terms of the BSD License. Redistribution and use in source and - binary forms, with or without modification, are permitted provided that the - following conditions are met: + You are receiving a copy of the Mozilla Public Suffix List in the following + file: /lib/security/public_suffix_list.dat. The terms of the + Oracle license do NOT apply to this file; it is licensed under the + Mozilla Public License 2.0, separately from the Oracle programs you receive. + If you do not wish to use the Public Suffix List, you may remove the + /lib/security/public_suffix_list.dat file. . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + The Source Code of this file is available under the + Mozilla Public License, v. 2.0 and is located at + https://raw.githubusercontent.com/publicsuffix/list/88467c960d6cdad2ca1623e892e5e17506bc269f/public_suffix_list.dat. + If a copy of the MPL was not distributed with this file, you can obtain one + at https://mozilla.org/MPL/2.0/. . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. . - Neither name of CoolServlets.com nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. . - THIS SOFTWARE IS PROVIDED BY COOLSERVLETS.COM AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + MPL v2.0 + . + Mozilla Public License Version 2.0 + ================================== + . + 1. Definitions + -------------- + . + 1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + . + 1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + . + 1.3. "Contribution" + means Covered Software of a particular Contributor. + . + 1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + . + 1.5. "Incompatible With Secondary Licenses" + means + . + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + . + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + . + 1.6. "Executable Form" + means any form of the work other than Source Code Form. + . + 1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + . + 1.8. "License" + means this document. + . + 1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + . + 1.10. "Modifications" + means any of the following: + . + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + . + (b) any new file in Source Code Form that contains any Covered + Software. + . + 1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + . + 1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + . + 1.13. "Source Code Form" + means the form of the work preferred for making modifications. + . + 1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + . + 2. License Grants and Conditions + -------------------------------- + . + 2.1. Grants + . + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + . + (a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + . + (b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + . + 2.2. Effective Date + . + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + . + 2.3. Limitations on Grant Scope + . + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + . + (a) for any code that a Contributor has removed from Covered Software; + or + . + (b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + . + (c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + . + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + . + 2.4. Subsequent Licenses + . + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + . + 2.5. Representation + . + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights + to grant the rights to its Contributions conveyed by this License. + . + 2.6. Fair Use + . + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + . + 2.7. Conditions + . + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted + in Section 2.1. + . + 3. Responsibilities + ------------------- + . + 3.1. Distribution of Source Form + . + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + . + 3.2. Distribution of Executable Form + . + If You distribute Covered Software in Executable Form then: + . + (a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + . + (b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + . + 3.3. Distribution of a Larger Work + . + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + . + 3.4. Notices + . + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, + or limitations of liability) contained within the Source Code Form of + the Covered Software, except that You may alter any license notices to + the extent required to remedy known factual inaccuracies. + . + 3.5. Application of Additional Terms + . + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + . + 4. Inability to Comply Due to Statute or Regulation + --------------------------------------------------- + . + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Software due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description must + be placed in a text file included with all distributions of the Covered + Software under this License. Except to the extent prohibited by statute + or regulation, such description must be sufficiently detailed for a + recipient of ordinary skill to be able to understand it. + . + 5. Termination + -------------- + . + 5.1. The rights granted under this License will terminate automatically + if You fail to comply with any of its terms. However, if You become + compliant, then the rights granted under this License from a particular + Contributor are reinstated (a) provisionally, unless and until such + Contributor explicitly and finally terminates Your grants, and (b) on an + ongoing basis, if such Contributor fails to notify You of the + non-compliance by some reasonable means prior to 60 days after You have + come back into compliance. Moreover, Your grants from a particular + Contributor are reinstated on an ongoing basis if such Contributor + notifies You of the non-compliance by some reasonable means, this is the + first time You have received notice of non-compliance with this License + from such Contributor, and You become compliant prior to 30 days after + Your receipt of the notice. + . + 5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + . + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all + end user license agreements (excluding distributors and resellers) which + have been validly granted by You or Your distributors under this License + prior to termination shall survive termination. + . + ************************************************************************ + * * + * 6. Disclaimer of Warranty * + * ------------------------- * + * * + * Covered Software is provided under this License on an "as is" * + * basis, without warranty of any kind, either expressed, implied, or * + * statutory, including, without limitation, warranties that the * + * Covered Software is free of defects, merchantable, fit for a * + * particular purpose or non-infringing. The entire risk as to the * + * quality and performance of the Covered Software is with You. * + * Should any Covered Software prove defective in any respect, You * + * (not any Contributor) assume the cost of any necessary servicing, * + * repair, or correction. This disclaimer of warranty constitutes an * + * essential part of this License. No use of any Covered Software is * + * authorized under this License except under this disclaimer. * + * * + ************************************************************************ + . + ************************************************************************ + * * + * 7. Limitation of Liability * + * -------------------------- * + * * + * Under no circumstances and under no legal theory, whether tort * + * (including negligence), contract, or otherwise, shall any * + * Contributor, or anyone who distributes Covered Software as * + * permitted above, be liable to You for any direct, indirect, * + * special, incidental, or consequential damages of any character * + * including, without limitation, damages for lost profits, loss of * + * goodwill, work stoppage, computer failure or malfunction, or any * + * and all other commercial damages or losses, even if such party * + * shall have been informed of the possibility of such damages. This * + * limitation of liability shall not apply to liability for death or * + * personal injury resulting from such party's negligence to the * + * extent applicable law prohibits such limitation. Some * + * jurisdictions do not allow the exclusion or limitation of * + * incidental or consequential damages, so this exclusion and * + * limitation may not apply to You. * + * * + ************************************************************************ + . + 8. Litigation + ------------- + . + Any litigation relating to this License may be brought only in the + courts of a jurisdiction where the defendant maintains its principal + place of business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. + Nothing in this Section shall prevent a party's ability to bring + cross-claims or counter-claims. + . + 9. Miscellaneous + ---------------- + . + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides + that the language of a contract shall be construed against the drafter + shall not be used to construe this License against a Contributor. + . + 10. Versions of the License + --------------------------- + . + 10.1. New Versions + . + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + . + 10.2. Effect of New Versions + . + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + . + 10.3. Modified Versions + . + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + . + 10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses + . + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + . + Exhibit A - Source Code Form License Notice + ------------------------------------------- + . + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + . + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to look + for such a notice. + . + You may add additional accurate notices of copyright ownership. + . + Exhibit B - "Incompatible With Secondary Licenses" Notice + --------------------------------------------------------- + . + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to The Unicode Standard, Unicode Character Database, Version 10.0.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Unicode Character Database + . + . + . + UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + Unicode Data Files include all data files under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + Unicode Data Files do not include PDF online code charts under the + directory http://www.unicode.org/Public/. + . + Software includes any source code published in the Unicode Standard + or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + NOTICE TO USER: Carefully read the following legal agreement. + BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S + DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), + YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. + IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE + THE DATA FILES OR SOFTWARE. + . + COPYRIGHT AND PERMISSION NOTICE + . + Copyright © 1991-2018 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + . + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. + . + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + . + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. + . . . --- end of LICENSE --- . - ------------------------------------------------------------------------------- + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Eastman Kodak Company: Portions of color management and imaging software, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Eastman Kodak Notice + . + Portions Copyright Eastman Kodak Company 1991-2003 + . . - %% This notice is provided with respect to Cryptix AES 3.2.0, which may be - included with JRE 8, JDK 8, and OpenJDK 8. + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to The FreeType Project: Freetype v2.13.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Cryptix General License . - Copyright (c) 1995-2005 The Cryptix Foundation Limited. - All rights reserved. + FreeType Notice . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: . - 1. Redistributions of source code must retain the copyright notice, - this list of conditions and the following disclaimer. + FreeType comes with two licenses from which you can choose the one + which fits your needs best. + . + The FreeType License (FTL) is the most commonly used one. It is + a BSD-style license with a credit clause and thus compatible with + the GNU Public License (GPL) version 3, but not with the + GPL version 2. + . + The GNU General Public License (GPL), version 2. Use it for all + projects which use the GPLv2 also, or which need a license + compatible to the GPLv2. + . + . + . + FreeType License + . + . + Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2007-2023 by Dereg Clegg and Michael Toftdal. + Copyright (C) 1996-2023 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and + Copyright (C) 2004-2023 by Masatake YAMATO and Redhat K.K. + Copyright (C) 2007-2023 by Derek Clegg and Michael Toftdal. + Copyright (C) 2003-2023 by Masatake YAMATO, Red Hat K.K., + Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. + Copyright (C) 2007-2023 by David Turner. + Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + Copyright (C) 2007-2023 by Rahul Bhalerao , . + Copyright (C) 2008-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. + Copyright (C) 2013-2023 by Google, Inc. + Copyright (C) 2019-2023 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2009-2023 by Oran Agra and Mickey Gabel. + Copyright (C) 2018-2023 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. + Copyright (C) 2004-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. + . + . + The FreeType Project LICENSE + ---------------------------- + . + 2006-Jan-27 + . + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + . + . + . + Introduction + ============ + . + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + . + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + . + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + . + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + . + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + . + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + . + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + . + . + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + . + """ + Portions of this software are copyright © The FreeType + Project (www.freetype.org). All rights reserved. + """ + . + Please replace with the value from the FreeType version you + actually use. + . + . + Legal Terms + =========== + . + 0. Definitions + -------------- + . + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + . + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + . + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + . + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + . + 1. No Warranty + -------------- + . + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + . + 2. Redistribution + ----------------- + . + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + . + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + . + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + . + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + . + 3. Advertising + -------------- + . + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + . + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + . + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + . + 4. Contacts + ----------- + . + There are two mailing lists related to FreeType: + . + o freetype@nongnu.org + . + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + . + o freetype-devel@nongnu.org + . + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + . + Our home page can be found at + . + https://www.freetype.org + . + . + . + GPL v2: Refer to the copy under /usr/share/common-licenses + . + Additional Freetype Attributions + . + . + --------------------------------- + The below license applies to the following files: + libfreetype/src/psaux/psarrst.c + libfreetype/src/psaux/psarrst.h + libfreetype/src/psaux/psblues.c + libfreetype/src/psaux/psblues.h + libfreetype/src/psaux/pserror.c + libfreetype/src/psaux/pserror.h + libfreetype/src/psaux/psfixed.h + libfreetype/src/psaux/psfont.c + libfreetype/src/psaux/psfont.h + libfreetype/src/psaux/psft.c + libfreetype/src/psaux/psft.h + libfreetype/src/psaux/psglue.h + libfreetype/src/psaux/pshints.c + libfreetype/src/psaux/pshints.h + libfreetype/src/psaux/psintrp.c + libfreetype/src/psaux/psintrp.h + libfreetype/src/psaux/psread.c + libfreetype/src/psaux/psread.h + libfreetype/src/psaux/psstack.c + libfreetype/src/psaux/psstack.h + libfreetype/src/psaux/pstypes.h + . + Copyright 2006-2014 Adobe Systems Incorporated. + . + This software, and all works of authorship, whether in source or + object code form as indicated by the copyright notice(s) included + herein (collectively, the "Work") is made available, and may only be + used, modified, and distributed under the FreeType Project License, + LICENSE.TXT. Additionally, subject to the terms and conditions of the + FreeType Project License, each contributor to the Work hereby grants + to any individual or legal entity exercising permissions granted by + the FreeType Project License and this section (hereafter, "You" or + "Your") a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable (except as stated in this section) patent + license to make, have made, use, offer to sell, sell, import, and + otherwise transfer the Work, where such license applies only to those + patent claims licensable by such contributor that are necessarily + infringed by their contribution(s) alone or by combination of their + contribution(s) with the Work to which such contribution(s) was + submitted. If You institute patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that + the Work or a contribution incorporated within the Work constitutes + direct or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate as of + the date such litigation is filed. + . + By using, modifying, or distributing the Work you indicate that you + have read and understood the terms and conditions of the + FreeType Project License as well as those provided in this section, + and you accept them fully. + . + . + . + . + MIT License + . + . + --------------------------------- + The below license applies to the following files: + libfreetype/include/freetype/internal/fthash.h + libfreetype/src/base/fthash.c + . + Copyright 2000 Computing Research Labs, New Mexico State University + Copyright 2001-2015 + . + Francesco Zappa Nardelli + . + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + . + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Harfbuzz v7.2.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Harfbuzz License + . + https://github.com/harfbuzz/harfbuzz/blob/7.2.0/COPYING + . + . + . + HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. + For parts of HarfBuzz that are licensed under different licenses see individual + files names COPYING in subdirectories where applicable. + . + Copyright © 2010-2023 Google, Inc. + Copyright © 2018-2020 Ebrahim Byagowi + Copyright © 2004-2013 Red Hat, Inc. + Copyright © 2019 Facebook, Inc. + Copyright © 2007 Chris Wilson + Copyright © 2018-2019 Adobe Inc. + Copyright © 2006-2023 Behdad Esfahbod + Copyright © 1998-2004 David Turner and Werner Lemberg + Copyright © 2009 Keith Stribley + Copyright © 2018 Khaled Hosny + Copyright © 2016 Elie Roux + Copyright © 2016 Igalia S.L. + Copyright © 2015 Mozilla Foundation. + Copyright © 1999 David Turner + Copyright © 2005 Werner Lemberg + Copyright © 2013-2015 Alexei Podtelezhnikov + Copyright © 2022 Matthias Clasen + Copyright © 2011 Codethink Limited + . + For full copyright notices consult the individual files in the package. + . + . + Permission is hereby granted, without written agreement and without + license or royalty fees, to use, copy, modify, and distribute this + software and its documentation for any purpose, provided that the + above copyright notice and the following two paragraphs appear in + all copies of this software. + . + IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + . + THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + . + All source code, except for one section, is licensed as above. The one + exception is licensed with a slightly different MIT variant: + The contents of this directory are licensed under the following terms: + . + --------------------------------- + The below license applies to the following files: + libharfbuzz/hb-ucd.cc + . + Copyright (C) 2012 Grigori Goronzy + . + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + . + . + . + AUTHORS File Information + . + . + Behdad Esfahbod + David Corbett + David Turner + Ebrahim Byagowi + Garret Rieger + Jonathan Kew + Khaled Hosny + Lars Knoll + Martin Hosken + Owen Taylor + Roderick Sheeter + Roozbeh Pournader + Simon Hausmann + Werner Lemberg . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. . - THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND - CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . --- end of LICENSE --- . - ------------------------------------------------------------------------------- + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Little Color Management System (LCMS) v2.15, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + LCMS License + . + README.1ST file information + . + LittleCMS core is released under MIT License . - %% This notice is provided with respect to CUP Parser Generator for - Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8. + --------------------------------- + . + Little CMS + Copyright (c) 1998-2023 Marti Maria Saguer + . + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject + to the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + . + --------------------------------- + The below license applies to the following files: + liblcms/cmssm.c + . + Copyright 2001, softSurfer (www.softsurfer.com) + . + This code may be freely used and modified for any purpose + providing that this copyright notice is included with it. + SoftSurfer makes no warranty for this code, and cannot be held + liable for any real or imagined damage resulting from its use. + Users of this code must verify correctness for their application. + . + . + . + AUTHORS File Information + . + . + . + Main Author + ------------ + Marti Maria + . + . + Contributors + ------------ + Bob Friesenhahn + Kai-Uwe Behrmann + Stuart Nixon + Jordi Vilar + Richard Hughes + Auke Nauta + Chris Evans (Google) + Lorenzo Ridolfi + Robin Watts (Artifex) + Shawn Pedersen + Andrew Brygin + Samuli Suominen + Florian Hˆch + Aurelien Jarno + Claudiu Cebuc + Michael Vhrel (Artifex) + Michal Cihar + Daniel Kaneider + Mateusz Jurczyk (Google) + Paul Miller + SÈbastien LÈon + Christian Schmitz + XhmikosR + Stanislav Brabec (SuSe) + Leonhard Gruenschloss (Google) + Patrick Noffke + Christopher James Halse Rogers + John Hein + Thomas Weber (Debian) + Mark Allen + Noel Carboni + Sergei Trofimovic + Philipp Knechtges + Amyspark + Lovell Fuller + Eli Schwartz + . + Special Thanks + -------------- + Artifex software + AlienSkin software + libVIPS + Jan Morovic + Jos Vernon (WebSupergoo) + Harald Schneider (Maxon) + Christian Albrecht + Dimitrios Anastassakis + Lemke Software + Tim Zaman + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Mesa 3-D Graphics Library v21.0.3, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian + Mesa License + . + . + Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + . + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + . + Attention, Contributors + . + When contributing to the Mesa project you must agree to the licensing terms + of the component to which you're contributing. + The following section lists the primary components of the Mesa distribution + and their respective licenses. + Mesa Component Licenses + . + . + . + Component Location License + ------------------------------------------------------------------ + Main Mesa code src/mesa/ MIT + Device drivers src/mesa/drivers/* MIT, generally + . + Gallium code src/gallium/ MIT + . + Ext headers GL/glext.h Khronos + GL/glxext.h Khronos + GL/wglext.h Khronos + KHR/khrplatform.h Khronos + . + ***************************************************************************** + . + ---- + include/GL/gl.h : + . + . + Mesa 3-D graphics library + . + Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + Copyright (C) 2009 VMware, Inc. All Rights Reserved. + . + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + . + ***************************************************************************** + . + ---- + include/GL/glext.h + include/GL/glxext.h + include/GL/wglxext.h : + . + . + Copyright (c) 2013 - 2018 The Khronos Group Inc. + . + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + . + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + . + ***************************************************************************** + . + ---- + include/KHR/khrplatform.h : + . + Copyright (c) 2008 - 2018 The Khronos Group Inc. + . + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + . + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + . + ***************************************************************************** + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to xwd v1.0.7, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + xwd utility + . + . + This is the copyright for the files in src/java.desktop/unix/native/libawt_xawt: + list.h, multiVis.h, wsutils.h, list.c, multiVis.c + . + Copyright 1994 Hewlett-Packard Co. + Copyright 1996, 1998 The Open Group + . + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + . + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. . - Permission to use, copy, modify, and distribute this software and its - documentation for any purpose and without fee is hereby granted, provided - that the above copyright notice appear in all copies and that both the - copyright notice and this permission notice and warranty disclaimer appear in - supporting documentation, and that the names of the authors or their - employers not be used in advertising or publicity pertaining to distribution of - the software without specific, written prior permission. . - The authors and their employers disclaim all warranties with regard to - this software, including all implied warranties of merchantability and fitness. - In no event shall the authors or their employers be liable for any special, - indirect or consequential damages or any damages whatsoever resulting from - loss of use, data or profits, whether in an action of contract, negligence or - other tortious action, arising out of or in connection with the use or - performance of this software. . --- end of LICENSE --- . ------------------------------------------------------------------------------ + %% This notice is provided with respect to Apache Commons Byte Code Engineering Library (BCEL) Version 6.7.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Apache Commons BCEL Notice + . . - %% This notice is provided with respect to Document Object Model (DOM) Level 2 - & 3, which may be included with JRE 8, JDK 8, and OpenJDK 8. + Apache Commons BCEL + Copyright 2004-2022 The Apache Software Foundation + . + This product includes software developed at + The Apache Software Foundation (https://www.apache.org/). + . + . + . + Apache 2.0 License: Refer to the copy under /usr/share/common-licenses + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to DOM Level 3 Core Specification v1.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . + W3C Software Notice + . + Copyright © 2004 World Wide Web Consortium, (Massachusetts Institute of Technology, + European Research Consortium for Informatics and Mathematics, Keio University). + All Rights Reserved. + . + The DOM bindings are published under the W3C Software Copyright Notice and License. + The software license requires "Notice of any changes or modifications to the W3C + files, including the date changes were made." Consequently, modified versions of + the DOM bindings must document that they do not conform to the W3C standard; in the + case of the IDL definitions, the pragma prefix can no longer be 'w3c.org'; in the + case of the Java language binding, the package names can no longer be in the + 'org.w3c' package. + . + . + W3C License + . + . W3C SOFTWARE NOTICE AND LICENSE . http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 @@ -391,17 +1962,17 @@ copies of the software and documentation or portions thereof, including modifications: . - 1.The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work. + 1.The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. . - 2.Any pre-existing intellectual property disclaimers, notices, or terms and - conditions. If none exist, the W3C Software Short Notice should be included - (hypertext is preferred, text is permitted) within the body of any - redistributed or derivative code. - . - 3.Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.) + 2.Any pre-existing intellectual property disclaimers, notices, or terms and + conditions. If none exist, the W3C Software Short Notice should be included + (hypertext is preferred, text is permitted) within the body of any + redistributed or derivative code. + . + 3.Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) . THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT @@ -431,70 +2002,366 @@ Jigsaw. Other questions about this notice can be directed to site-policy@w3.org. . + . + . --- end of LICENSE --- . - ------------------------------------------------------------------------------- + ------------------------------------------------------------------------------ + %% This notice is provided with respect to CUP Parser Generator for Java v 0.11b, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + CUP Parser Generator License + . + . + Copyright 1996-2015 by Scott Hudson, Frank Flannery, C. Scott Ananian, Michael Petter + . + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, provided + that the above copyright notice appear in all copies and that both + the copyright notice and this permission notice and warranty disclaimer + appear in supporting documentation, and that the names of the authors or + their employers not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior permission. + . + The authors and their employers disclaim all warranties with regard to + this software, including all implied warranties of merchantability and + fitness. In no event shall the authors or their employers be liable for + any special, indirect or consequential damages or any damages whatsoever + resulting from loss of use, data or profits, whether in an action of + contract, negligence or other tortious action, arising out of or in + connection with the use or performance of this software. . - %% This notice is provided with respect to Dynalink v0.5, which may be - included with JRE 8, JDK 8, and OpenJDK 8. + --- + . + This is an open source license. It is also GPL-Compatible (see entry for + "Standard ML of New Jersey"). The portions of CUP output which are hard-coded + into the CUP source code are (naturally) covered by this same license, as is + the CUP runtime code linked with the generated parser. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Apache Xalan v2.7.2, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright (c) 2009-2013, Attila Szegedi + Apache Xalan Notice + . + . + ====================================================================================== + == NOTICE file corresponding to the section 4d of the Apache License, Version 2.0, == + == in this case for the Apache Xalan distribution. == + ====================================================================================== + . + This product includes software developed by + The Apache Software Foundation (http://www.apache.org/). + . + Specifically, we only include the XSLTC portion of the source from the Xalan distribution. + The Xalan project has two processors: an interpretive one (Xalan Interpretive) and a + compiled one (The XSLT Compiler (XSLTC)). We *only* use the XSLTC part of Xalan; We use + the source from the packages that are part of the XSLTC sources. + . + Portions of this software was originally based on the following: + . + - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com. + - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com. + - software copyright (c) 2003, IBM Corporation., http://www.ibm.com. + - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the + Apache Software Foundation and was originally developed at Hewlett Packard Company. + . + . + . + Apache 2.0 License: Refer to the copy under /usr/share/common-licenses + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Apache Xerces v2.12.2, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Apache Xerces Notice + . + ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the Apache Xerces Java distribution. == + ========================================================================= + . + Apache Xerces Java + Copyright 1999-2022 The Apache Software Foundation + . + This product includes software developed at + The Apache Software Foundation (http://www.apache.org/). + . + Portions of this software were originally based on the following: + - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. + - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. + - voluntary contributions made by Paul Eng on behalf of the + Apache Software Foundation that were originally developed at iClick, Inc., + software copyright (c) 1999. + . + . + Apache 2.0 License: Refer to the copy under /usr/share/common-licenses + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Apache Santuario v2.3.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + Apache Santuario Notice + . + . + Apache Santuario - XML Security for Java + Copyright 1999-2021 The Apache Software Foundation + . + This product includes software developed at + The Apache Software Foundation (http://www.apache.org/). + . + It was originally based on software copyright (c) 2001, Institute for + Data Communications Systems, . + . + The development of this software was partly funded by the European + Commission in the project in the ISIS Programme. + . + . + . + Apache 2.0 License: Refer to the copy under /usr/share/common-licenses + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to OASIS PKCS #11 Cryptographic Token Interface v3.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + OASIS PKCS #11 Cryptographic Token Interface License + . + . + Copyright © OASIS Open 2020. All Rights Reserved. + . + All capitalized terms in the following text have the meanings + assigned to them in the OASIS Intellectual Property Rights Policy (the + "OASIS IPR Policy"). The full Policy may be found at the OASIS website: + [http://www.oasis-open.org/policies-guidelines/ipr] + . + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it or + assist in its implementation may be prepared, copied, published, and + distributed, in whole or in part, without restriction of any kind, + provided that the above copyright notice and this section are included + on all such copies and derivative works. However, this document itself + may not be modified in any way, including by removing the copyright + notice or references to OASIS, except as needed for the purpose of + developing any document or deliverable produced by an OASIS Technical + Committee (in which case the rules applicable to copyrights, as set + forth in the OASIS IPR Policy, must be followed) or as required to + translate it into languages other than English. + . + The limited permissions granted above are perpetual and will not be + revoked by OASIS or its successors or assigns. + . + This document and the information contained herein is provided on an + "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE + INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED + WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. OASIS + AND ITS MEMBERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THIS DOCUMENT OR ANY + PART THEREOF. + . + [OASIS requests that any OASIS Party or any other party that + believes it has patent claims that would necessarily be infringed by + implementations of this OASIS Standards Final Deliverable, to notify + OASIS TC Administrator and provide an indication of its willingness to + grant patent licenses to such patent claims in a manner consistent with + the IPR Mode of the OASIS Technical Committee that produced this + deliverable.] + . + [OASIS invites any party to contact the OASIS TC Administrator if it + is aware of a claim of ownership of any patent claims that would + necessarily be infringed by implementations of this OASIS Standards + Final Deliverable by a patent holder that is not willing to provide a + license to such patent claims in a manner consistent with the IPR Mode + of the OASIS Technical Committee that produced this OASIS Standards + Final Deliverable. OASIS may include such claims on its website, but + disclaims any obligation to do so.] + . + [OASIS takes no position regarding the validity or scope of any + intellectual property or other rights that might be claimed to pertain + to the implementation or use of the technology described in this OASIS + Standards Final Deliverable or the extent to which any license under + such rights might or might not be available; neither does it represent + that it has made any effort to identify any such rights. Information on + OASIS' procedures with respect to rights in any document or deliverable + produced by an OASIS Technical Committee can be found on the OASIS + website. Copies of claims of rights made available for publication and + any assurances of licenses to be made available, or the result of an + attempt made to obtain a general license or permission for the use of + such proprietary rights by implementers or users of this OASIS Standards + Final Deliverable, can be obtained from the OASIS TC Administrator. + OASIS makes no representation that any information or list of + intellectual property rights will at any time be complete, or that any + claims in such list are, in fact, Essential Claims.] + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to IAIK (Institute for Applied Information Processing and Communication) PKCS#11 wrapper files v1, + which may be included with JRE 11, JDK 11 and OpenJDK 11 + . + --- begin of LICENSE --- + . + IAIK License + . + . + Copyright (c) 2002 Graz University of Technology. All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + 3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: + . + "This product includes software developed by IAIK of Graz University of + Technology." + . + Alternately, this acknowledgment may appear in the software itself, if and + wherever such third-party acknowledgments normally appear. + . + 4. The names "Graz University of Technology" and "IAIK of Graz University of + Technology" must not be used to endorse or promote products derived from this + software without prior written permission. + . + 5. Products derived from this software may not be called "IAIK PKCS Wrapper", + nor may "IAIK" appear in their name, without prior written permission of + Graz University of Technology. + . + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. . - All rights reserved.Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following conditions are - met:* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. * Redistributions in - binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. * Neither the name of Attila - Szegedi nor the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written permission. . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE. . --- end of LICENSE --- . - ------------------------------------------------------------------------------- + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Mozilla Elliptic Curve Cryptography (ECC), + which may be included with JRE 11, JDK 11 and OpenJDK 11 . - %% This notice is provided with respect to Elliptic Curve Cryptography, which - may be included with JRE 8, JDK 8, and OpenJDK 8. + --- begin of LICENSE --- . - You are receiving a copy of the Elliptic Curve Cryptography library in source - form with the JDK 8 and OpenJDK 8 source distributions, and as object code in - the JRE 8 & JDK 8 runtimes. + Mozilla ECC Notice . - In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do + This notice is provided with respect to Elliptic Curve Cryptography, + which is included with JRE, JDK, and OpenJDK. + . + You are receiving a [copy](http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.crypto.ec/share/native/libsunec/impl) + of the Elliptic Curve Cryptography library in source + form with the JDK and OpenJDK source distributions, and as object code in + the JRE & JDK runtimes. + . + In the case of the JRE & JDK runtimes, the terms of the Oracle license do NOT apply to the Elliptic Curve Cryptography library; it is licensed under the following license, separately from Oracle's JDK & JRE. If you do not wish to - install the Elliptic Curve Cryptography library, you may delete the library - named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows - systems) from the JRE bin directory reserved for native libraries. + install the Elliptic Curve Cryptography library, you may delete the + Elliptic Curve Cryptography library: + - On Solaris and Linux systems: delete $(JAVA_HOME)/lib/libsunec.so + - On Mac OSX systems: delete $(JAVA_HOME)/lib/libsunec.dylib + - On Windows systems: delete $(JAVA_HOME)\bin\sunec.dll . . - --- begin of LICENSE --- + . + Written Offer for Source Code + . + . + For third party technology that you receive from Oracle in binary form + which is licensed under an open source license that gives you the right + to receive the source code for that binary, you can obtain a copy of + the applicable source code from this page: + http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.crypto.ec/share/native/libsunec/impl + . + If the source code for the technology was not provided to you with the + binary, you can also receive a copy of the source code on physical + media by submitting a written request to: + . + Oracle America, Inc. + Attn: Associate General Counsel, + Development and Engineering Legal + 500 Oracle Parkway, 10th Floor + Redwood Shores, CA 94065 + . + Or, you may send an email to Oracle using the form at: + . + http://www.oracle.com/goto/opensourcecode/request + . + Your request should include: + . + - The name of the component or binary file(s) for which you are requesting the source code + . + - The name and version number of the Oracle product containing the binary + . + - The date you received the Oracle product + . + - Your name + . + - Your company name (if applicable) + . + - Your return mailing address and email and + . + - A telephone number in the event we need to reach you. + . + We may charge you a fee to cover the cost of physical media and processing. + Your request must be sent (i) within three (3) years of the date you + received the Oracle product that included the component or binary + file(s) that are the subject of your request, or (ii) in the case of + code licensed under the GPL v3, for as long as Oracle offers spare + parts or customer support for that product model. + . + . + . + LGPL 2.1 + . . GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + Version 2.1, February 1999 . - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. . [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] . Preamble . @@ -599,7 +2466,7 @@ be combined with the library in order to run. . GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION . 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or @@ -941,9 +2808,9 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. . - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS . - How to Apply These Terms to Your New Libraries + How to Apply These Terms to Your New Libraries . If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that @@ -987,82 +2854,19 @@ . That's all there is to it! . + . + . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to ECMAScript Language - Specification ECMA-262 Edition 5.1 which may be included with - JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to Dynalink v.5, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright notice - Copyright © 2011 Ecma International - Ecma International - Rue du Rhone 114 - CH-1204 Geneva - Tel: +41 22 849 6000 - Fax: +41 22 849 6001 - Web: http://www.ecma-international.org - . - This document and possible translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it or assist - in its implementation may be prepared, copied, published, and distributed, in - whole or in part, without restriction of any kind, provided that the above - copyright notice and this section are included on all such copies and derivative - works. However, this document itself may not be modified in any way, including - by removing the copyright notice or references to Ecma International, except as - needed for the purpose of developing any document or deliverable produced by - Ecma International (in which case the rules applied to copyrights must be - followed) or as required to translate it into languages other than English. The - limited permissions granted above are perpetual and will not be revoked by Ecma - International or its successors or assigns. This document and the information - contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL - DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY - WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP - RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR - PURPOSE." Software License - . - All Software contained in this document ("Software)" is protected by copyright - and is being made available under the "BSD License", included below. This - Software may be subject to third party rights (rights from parties other than - Ecma International), including patent rights, and no licenses under such third - party rights are granted under this license even if the third party concerned is - a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS - AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR - INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO - IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and - binary forms, with or without modification, are permitted provided that the - following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - . - 3. Neither the name of the authors nor Ecma International may be used to endorse - or promote products derived from this software without specific prior written - permission. - . - THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - OF SUCH DAMAGE. - --- end of LICENSE --- + Dynalink License . - %% This notice is provided with respect to Dynalink library which is included - with the Nashorn technology. . - --- begin of LICENSE --- Copyright (c) 2009-2013, Attila Szegedi . Redistribution and use in source and binary forms, with or without @@ -1088,223 +2892,103 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --- end of LICENSE --- - . - %% This notice is provided with respect to Joni library which is included - with the Nashorn technology. - . - --- begin of LICENSE --- - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is furnished to do - so, subject to the following conditions: . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to FontConfig 2.5, which may be - included with JRE 8, JDK 8, and OpenJDK 8 source distributions on - Linux and Solaris. + %% This notice is provided with respect to JLine v3.22.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright © 2001,2003 Keith Packard - . - Permission to use, copy, modify, distribute, and sell this software and its - documentation for any purpose is hereby granted without fee, provided that the - above copyright notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting documentation, and that - the name of Keith Packard not be used in advertising or publicity pertaining - to distribution of the software without specific, written prior permission. - Keith Packard makes no representations about the suitability of this software - for any purpose. It is provided "as is" without express or implied warranty. - . - KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH - PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - . - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to IAIK PKCS#11 Wrapper, - which may be included with JRE 8, JDK 8, and OpenJDK 8. - . - --- begin of LICENSE --- + JLine License . - IAIK PKCS#11 Wrapper License . - Copyright (c) 2002 Graz University of Technology. All rights reserved. + Copyright (c) 2002-2018, the original author or authors. + All rights reserved. . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + https://opensource.org/licenses/BSD-3-Clause . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + Redistribution and use in source and binary forms, with or + without modification, are permitted provided that the following + conditions are met: . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. . - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. . - "This product includes software developed by IAIK of Graz University of - Technology." + Neither the name of JLine nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. . - Alternately, this acknowledgment may appear in the software itself, if and - wherever such third-party acknowledgments normally appear. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. . - 4. The names "Graz University of Technology" and "IAIK of Graz University of - Technology" must not be used to endorse or promote products derived from this - software without prior written permission. . - 5. Products derived from this software may not be called "IAIK PKCS Wrapper", - nor may "IAIK" appear in their name, without prior written permission of - Graz University of Technology. - . - THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which - may be included with JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to jopt-simple v5.0.4, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Copyright (c) 1995-2010 International Business Machines Corporation and others - . - All rights reserved. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, - provided that the above copyright notice(s) and this permission notice appear - in all copies of the Software and that both the above copyright notice(s) and - this permission notice appear in supporting documentation. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN - NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE - LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - . - Except as contained in this notice, the name of a copyright holder shall not - be used in advertising or otherwise to promote the sale, use or other dealings - in this Software without prior written authorization of the copyright holder. - All trademarks and registered trademarks mentioned herein are the property of - their respective owners. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ + MIT License . - %% This notice is provided with respect to IJG JPEG 6b, which may be - included with JRE 8, JDK 8, and OpenJDK 8. . - --- begin of LICENSE --- + Copyright (c) 2004-2015 Paul R. Holser, Jr. . - This software is copyright (C) 1991-1998, Thomas G. Lane. - All Rights Reserved except as specified below. + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: . - Permission is hereby granted to use, copy, modify, and distribute this - software (or portions thereof) for any purpose, without fee, subject to these - conditions: - (1) If any part of the source code for this software is distributed, then this - README file must be included, with this copyright and no-warranty notice - unaltered; and any additions, deletions, or changes to the original files - must be clearly indicated in accompanying documentation. - (2) If only executable code is distributed, then the accompanying - documentation must state that "this software is based in part on the work of - the Independent JPEG Group". - (3) Permission for use of this software is granted only if the user accepts - full responsibility for any undesirable consequences; the authors accept - NO LIABILITY for damages of any kind. + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. . - These conditions apply to any software derived from or based on the IJG code, - not just to the unmodified library. If you use our work, you ought to - acknowledge us. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. . - Permission is NOT granted for the use of any IJG author's name or company name - in advertising or publicity relating to this software or products derived from - it. This software may be referred to only as "the Independent JPEG Group's - software". . - We specifically permit and encourage the use of this software as the basis of - commercial products, provided that all warranty or liability claims are - assumed by the product vendor. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Joni v1.1.9, which may be - included with JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to jQuery v3.6.1, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + jQuery License . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to JOpt-Simple v3.0, which may be - included with JRE 8, JDK 8, and OpenJDK 8. - . - --- begin of LICENSE --- - . - Copyright (c) 2004-2009 Paul R. Holser, Jr. + jQuery v 3.6.1 + Copyright OpenJS Foundation and other contributors, https://openjsf.org/ . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -1325,760 +3009,780 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Kerberos functionality, which - which may be included with JRE 8, JDK 8, and OpenJDK 8. - . - --- begin of LICENSE --- - . - (C) Copyright IBM Corp. 1999 All Rights Reserved. - Copyright 1997 The Open Group Research Institute. All rights reserved. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Kerberos functionality from - FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8. - . - --- begin of LICENSE --- - . - Copyright (C) 1998 by the FundsXpress, INC. - . - All rights reserved. - . - Export of this software from the United States of America may require - a specific license from the United States Government. It is the - responsibility of any person or organization contemplating export to - obtain such a license before exporting. + ****************************************** . - WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - distribute this software and its documentation for any purpose and - without fee is hereby granted, provided that the above copyright - notice appear in all copies and that both that copyright notice and - this permission notice appear in supporting documentation, and that - the name of FundsXpress. not be used in advertising or publicity pertaining - to distribution of the software without specific, written prior - permission. FundsXpress makes no representations about the suitability of - this software for any purpose. It is provided "as is" without express - or implied warranty. + The jQuery JavaScript Library v3.6.1 also includes Sizzle.js . - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + Sizzle.js includes the following license: . + Copyright JS Foundation and other contributors, https://js.foundation/ . - --- end of LICENSE --- + This software consists of voluntary contributions made by many + individuals. For exact contribution history, see the revision history + available at https://github.com/jquery/sizzle . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Kronos OpenGL headers, which may be - included with JDK 8 and OpenJDK 8 source distributions. - . - --- begin of LICENSE --- + The following license applies to all parts of this software except as + documented below: . - Copyright (c) 2007 The Khronos Group Inc. + ==== . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and/or associated documentation files (the "Materials"), to - deal in the Materials without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Materials, and to permit persons to whom the Materials are - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Materials. - . - THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE - MATERIALS. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------- - . - %% Lucida is a registered trademark or trademark of Bigelow & Holmes in the - U.S. and other countries. - . - ------------------------------------------------------------------------------- + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: . - %% This notice is provided with respect to Mesa 3D Graphics Library v4.1, - which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions. + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. . - --- begin of LICENSE --- + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . - Mesa 3-D graphics library - Version: 4.1 + ==== . - Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + All files located in the node_modules and external directories are + externally maintained libraries used by this software which have their + own licenses; we recommend you read them, as their terms may differ from + the terms above. . - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: + ********************* . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Mozilla Network Security - Services (NSS), which is supplied with the JDK test suite in the OpenJDK - source code repository. It is licensed under Mozilla Public License (MPL), - version 2.0. - . - The NSS libraries are supplied in executable form, built from unmodified - NSS source code labeled with the "NSS_3.13.1_RTM" release tag. - . - The NSS source code is available in the OpenJDK source code repository at: - jdk/test/sun/security/pkcs11/nss/src - . - The NSS libraries are available in the OpenJDK source code repository at: - jdk/test/sun/security/pkcs11/nss/lib + %% This notice is provided with respect to jQuery UI v1.13.2, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Mozilla Public License Version 2.0 - ================================== + jQuery UI License . - 1. Definitions - -------------- + Copyright jQuery Foundation and other contributors, https://jquery.org/ . - 1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. + This software consists of voluntary contributions made by many + individuals. For exact contribution history, see the revision history + available at https://github.com/jquery/jquery-ui . - 1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. + The following license applies to all parts of this software except as + documented below: . - 1.3. "Contribution" - means Covered Software of a particular Contributor. - . - 1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - . - 1.5. "Incompatible With Secondary Licenses" - means - . - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - . - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - . - 1.6. "Executable Form" - means any form of the work other than Source Code Form. - . - 1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - . - 1.8. "License" - means this document. + ==== . - 1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - . - 1.10. "Modifications" - means any of the following: - . - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - . - (b) any new file in Source Code Form that contains any Covered - Software. - . - 1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - . - 1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - . - 1.13. "Source Code Form" - means the form of the work preferred for making modifications. - . - 1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - . - 2. License Grants and Conditions - -------------------------------- - . - 2.1. Grants - . - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - . - (a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - . - (b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - . - 2.2. Effective Date - . - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - . - 2.3. Limitations on Grant Scope - . - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - . - (a) for any code that a Contributor has removed from Covered Software; - or - . - (b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - . - (c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - . - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - . - 2.4. Subsequent Licenses - . - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - . - 2.5. Representation - . - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights - to grant the rights to its Contributions conveyed by this License. - . - 2.6. Fair Use - . - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - . - 2.7. Conditions - . - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted - in Section 2.1. - . - 3. Responsibilities - ------------------- - . - 3.1. Distribution of Source Form - . - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - . - 3.2. Distribution of Executable Form - . - If You distribute Covered Software in Executable Form then: - . - (a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - . - (b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - . - 3.3. Distribution of a Larger Work - . - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - . - 3.4. Notices - . - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, - or limitations of liability) contained within the Source Code Form of - the Covered Software, except that You may alter any license notices to - the extent required to remedy known factual inaccuracies. - . - 3.5. Application of Additional Terms - . - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - . - 4. Inability to Comply Due to Statute or Regulation - --------------------------------------------------- - . - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Software due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description must - be placed in a text file included with all distributions of the Covered - Software under this License. Except to the extent prohibited by statute - or regulation, such description must be sufficiently detailed for a - recipient of ordinary skill to be able to understand it. - . - 5. Termination - -------------- - . - 5.1. The rights granted under this License will terminate automatically - if You fail to comply with any of its terms. However, if You become - compliant, then the rights granted under this License from a particular - Contributor are reinstated (a) provisionally, unless and until such - Contributor explicitly and finally terminates Your grants, and (b) on an - ongoing basis, if such Contributor fails to notify You of the - non-compliance by some reasonable means prior to 60 days after You have - come back into compliance. Moreover, Your grants from a particular - Contributor are reinstated on an ongoing basis if such Contributor - notifies You of the non-compliance by some reasonable means, this is the - first time You have received notice of non-compliance with this License - from such Contributor, and You become compliant prior to 30 days after - Your receipt of the notice. - . - 5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - . - 5.3. In the event of termination under Sections 5.1 or 5.2 above, all - end user license agreements (excluding distributors and resellers) which - have been validly granted by You or Your distributors under this License - prior to termination shall survive termination. - . - ************************************************************************ - * * - * 6. Disclaimer of Warranty * - * ------------------------- * - * * - * Covered Software is provided under this License on an "as is" * - * basis, without warranty of any kind, either expressed, implied, or * - * statutory, including, without limitation, warranties that the * - * Covered Software is free of defects, merchantable, fit for a * - * particular purpose or non-infringing. The entire risk as to the * - * quality and performance of the Covered Software is with You. * - * Should any Covered Software prove defective in any respect, You * - * (not any Contributor) assume the cost of any necessary servicing, * - * repair, or correction. This disclaimer of warranty constitutes an * - * essential part of this License. No use of any Covered Software is * - * authorized under this License except under this disclaimer. * - * * - ************************************************************************ - . - ************************************************************************ - * * - * 7. Limitation of Liability * - * -------------------------- * - * * - * Under no circumstances and under no legal theory, whether tort * - * (including negligence), contract, or otherwise, shall any * - * Contributor, or anyone who distributes Covered Software as * - * permitted above, be liable to You for any direct, indirect, * - * special, incidental, or consequential damages of any character * - * including, without limitation, damages for lost profits, loss of * - * goodwill, work stoppage, computer failure or malfunction, or any * - * and all other commercial damages or losses, even if such party * - * shall have been informed of the possibility of such damages. This * - * limitation of liability shall not apply to liability for death or * - * personal injury resulting from such party's negligence to the * - * extent applicable law prohibits such limitation. Some * - * jurisdictions do not allow the exclusion or limitation of * - * incidental or consequential damages, so this exclusion and * - * limitation may not apply to You. * - * * - ************************************************************************ - . - 8. Litigation - ------------- - . - Any litigation relating to this License may be brought only in the - courts of a jurisdiction where the defendant maintains its principal - place of business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. - Nothing in this Section shall prevent a party's ability to bring - cross-claims or counter-claims. - . - 9. Miscellaneous - ---------------- - . - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides - that the language of a contract shall be construed against the drafter - shall not be used to construe this License against a Contributor. - . - 10. Versions of the License - --------------------------- - . - 10.1. New Versions - . - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - . - 10.2. Effect of New Versions - . - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - . - 10.3. Modified Versions - . - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - . - 10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses - . - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - . - Exhibit A - Source Code Form License Notice - ------------------------------------------- - . - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - . - If it is not possible or desirable to put the notice in a particular - file, then You may include the notice in a location (such as a LICENSE - file in a relevant directory) where a recipient would be likely to look - for such a notice. - . - You may add additional accurate notices of copyright ownership. + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: . - Exhibit B - "Incompatible With Secondary Licenses" Notice - --------------------------------------------------------- + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. . - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . - --- end of LICENSE --- + ==== . - ------------------------------------------------------------------------------ + Copyright and related rights for sample code are waived via CC0. Sample + code is defined as all source code contained within the demos directory. . - %% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1, - which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. + CC0: http://creativecommons.org/publicdomain/zero/1.0/ . - --- begin of LICENSE --- + ==== . - Copyright (c) 1999-2004 David Corcoran - Copyright (c) 1999-2004 Ludovic Rousseau - All rights reserved. + All files located in the node_modules and external directories are + externally maintained libraries used by this software which have their + own licenses; we recommend you read them, as their terms may differ from + the terms above. . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: . - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by: - David Corcoran - http://www.linuxnet.com (MUSCLE) - 4. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - Changes to this license can be made only by the copyright author with - explicit written consent. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to PorterStemmer v4, which may be - included with JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to JSZip v3.7.1, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - See: http://tartarus.org/~martin/PorterStemmer + JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3 + license. . - The software is completely free for any purpose, unless notes at the head of - the program text indicates otherwise (which is rare). In any case, the notes - about licensing are never more restrictive than the BSD License. + The MIT License . - In every case where the software is not written by me (Martin Porter), this - licensing arrangement has been endorsed by the contributor, and it is - therefore unnecessary to ask the contributor again to confirm it. - . - I have not asked any contributors (or their employers, if they have them) for - proofs that they have the right to distribute their software in this way. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Relax NG Object/Parser v.20050510, - which may be included with JRE 8, JDK 8, and OpenJDK 8. - . - --- begin of LICENSE --- - . - Copyright (c) Kohsuke Kawaguchi + Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: The above copyright - notice and this permission notice shall be included in all copies or - substantial portions of the Software. + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. . - --- end of LICENSE --- . - ------------------------------------------------------------------------------ + GPL version 3 . - %% This notice is provided with respect to RelaxNGCC v1.12, which may be - included with JRE 8, JDK 8, and OpenJDK 8. . - --- begin of LICENSE --- + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 . - Copyright (c) 2000-2003 Daisuke Okajima and Kohsuke Kawaguchi. - All rights reserved. + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + Preamble . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + The GNU General Public License is a free, copyleft license for + software and other kinds of works. . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + The licenses for most software and other practical works are designed + to take away your freedom to share and change the works. By contrast, + the GNU General Public License is intended to guarantee your freedom to + share and change all versions of a program--to make sure it remains free + software for all its users. We, the Free Software Foundation, use the + GNU General Public License for most of our software; it applies also to + any other work released this way by its authors. You can apply it to + your programs, too. + . + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + them if you wish), that you receive source code or can get it if you + want it, that you can change the software or use pieces of it in new + free programs, and that you know you can do these things. + . + To protect your rights, we need to prevent others from denying you + these rights or asking you to surrender the rights. Therefore, you have + certain responsibilities if you distribute copies of the software, or if + you modify it: responsibilities to respect the freedom of others. + . + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must pass on to the recipients the same + freedoms that you received. You must make sure that they, too, receive + or can get the source code. And you must show them these terms so they + know their rights. + . + Developers that use the GNU GPL protect your rights with two steps: + (1) assert copyright on the software, and (2) offer you this License + giving you legal permission to copy, distribute and/or modify it. + . + For the developers' and authors' protection, the GPL clearly explains + that there is no warranty for this free software. For both users' and + authors' sake, the GPL requires that modified versions be marked as + changed, so that their problems will not be attributed erroneously to + authors of previous versions. + . + Some devices are designed to deny users access to install or run + modified versions of the software inside them, although the manufacturer + can do so. This is fundamentally incompatible with the aim of + protecting users' freedom to change the software. The systematic + pattern of such abuse occurs in the area of products for individuals to + use, which is precisely where it is most unacceptable. Therefore, we + have designed this version of the GPL to prohibit the practice for those + products. If such problems arise substantially in other domains, we + stand ready to extend this provision to those domains in future versions + of the GPL, as needed to protect the freedom of users. + . + Finally, every program is threatened constantly by software patents. + States should not allow patents to restrict development and use of + software on general-purpose computers, but in those that do, we wish to + avoid the special danger that patents applied to a free program could + make it effectively proprietary. To prevent this, the GPL assures that + patents cannot be used to render the program non-free. . - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: + The precise terms and conditions for copying, distribution and + modification follow. . - "This product includes software developed by Daisuke Okajima - and Kohsuke Kawaguchi (http://relaxngcc.sf.net/)." + TERMS AND CONDITIONS . - Alternately, this acknowledgment may appear in the software itself, if and - wherever such third-party acknowledgments normally appear. + 0. Definitions. . - 4. The names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission. For - written permission, please contact the copyright holders. + "This License" refers to version 3 of the GNU General Public License. . - 5. Products derived from this software may not be called "RELAXNGCC", nor may - "RELAXNGCC" appear in their name, without prior written permission of the - copyright holders. + "Copyright" also means copyright-like laws that apply to other kinds of + works, such as semiconductor masks. + . + "The Program" refers to any copyrightable work licensed under this + License. Each licensee is addressed as "you". "Licensees" and + "recipients" may be individuals or organizations. + . + To "modify" a work means to copy from or adapt all or part of the work + in a fashion requiring copyright permission, other than the making of an + exact copy. The resulting work is called a "modified version" of the + earlier work or a work "based on" the earlier work. + . + A "covered work" means either the unmodified Program or a work based + on the Program. + . + To "propagate" a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it on a + computer or modifying a private copy. Propagation includes copying, + distribution (with or without modification), making available to the + public, and in some countries other activities as well. + . + To "convey" a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user through + a computer network, with no transfer of a copy, is not conveying. + . + An interactive user interface displays "Appropriate Legal Notices" + to the extent that it includes a convenient and prominently visible + feature that (1) displays an appropriate copyright notice, and (2) + tells the user that there is no warranty for the work (except to the + extent that warranties are provided), that licensees may convey the + work under this License, and how to view a copy of this License. If + the interface presents a list of user commands or options, such as a + menu, a prominent item in the list meets this criterion. + . + 1. Source Code. + . + The "source code" for a work means the preferred form of the work + for making modifications to it. "Object code" means any non-source + form of a work. + . + A "Standard Interface" means an interface that either is an official + standard defined by a recognized standards body, or, in the case of + interfaces specified for a particular programming language, one that + is widely used among developers working in that language. + . + The "System Libraries" of an executable work include anything, other + than the work as a whole, that (a) is included in the normal form of + packaging a Major Component, but which is not part of that Major + Component, and (b) serves only to enable use of the work with that + Major Component, or to implement a Standard Interface for which an + implementation is available to the public in source code form. A + "Major Component", in this context, means a major essential component + (kernel, window system, and so on) of the specific operating system + (if any) on which the executable work runs, or a compiler used to + produce the work, or an object code interpreter used to run it. + . + The "Corresponding Source" for a work in object code form means all + the source code needed to generate, install, and (for an executable + work) run the object code and to modify the work, including scripts to + control those activities. However, it does not include the work's + System Libraries, or general-purpose tools or generally available free + programs which are used unmodified in performing those activities but + which are not part of the work. For example, Corresponding Source + includes interface definition files associated with source files for + the work, and the source code for shared libraries and dynamically + linked subprograms that the work is specifically designed to require, + such as by intimate data communication or control flow between those + subprograms and other parts of the work. + . + The Corresponding Source need not include anything that users + can regenerate automatically from other parts of the Corresponding + Source. + . + The Corresponding Source for a work in source code form is that + same work. + . + 2. Basic Permissions. + . + All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program. The output from running a + covered work is covered by this License only if the output, given its + content, constitutes a covered work. This License acknowledges your + rights of fair use or other equivalent, as provided by copyright law. + . + You may make, run and propagate covered works that you do not + convey, without conditions so long as your license otherwise remains + in force. You may convey covered works to others for the sole purpose + of having them make modifications exclusively for you, or provide you + with facilities for running those works, provided that you comply with + the terms of this License in conveying all material for which you do + not control copyright. Those thus making or running the covered works + for you must do so exclusively on your behalf, under your direction + and control, on terms that prohibit them from making any copies of + your copyrighted material outside their relationship with you. + . + Conveying under any other circumstances is permitted solely under + the conditions stated below. Sublicensing is not allowed; section 10 + makes it unnecessary. + . + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + . + No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under article + 11 of the WIPO copyright treaty adopted on 20 December 1996, or + similar laws prohibiting or restricting circumvention of such + measures. + . + When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such circumvention + is effected by exercising rights under this License with respect to + the covered work, and you disclaim any intention to limit operation or + modification of the work as a means of enforcing, against the work's + users, your or third parties' legal rights to forbid circumvention of + technological measures. + . + 4. Conveying Verbatim Copies. + . + You may convey verbatim copies of the Program's source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; + keep intact all notices stating that this License and any + non-permissive terms added in accord with section 7 apply to the code; + keep intact all notices of the absence of any warranty; and give all + recipients a copy of this License along with the Program. + . + You may charge any price or no price for each copy that you convey, + and you may offer support or warranty protection for a fee. + . + 5. Conveying Modified Source Versions. + . + You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the + terms of section 4, provided that you also meet all of these conditions: + . + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + . + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + . + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + . + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + . + A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered work, + and which are not combined with it such as to form a larger program, + in or on a volume of a storage or distribution medium, is called an + "aggregate" if the compilation and its resulting copyright are not + used to limit the access or legal rights of the compilation's users + beyond what the individual works permit. Inclusion of a covered work + in an aggregate does not cause this License to apply to the other + parts of the aggregate. + . + 6. Conveying Non-Source Forms. + . + You may convey a covered work in object code form under the terms + of sections 4 and 5, provided that you also convey the + machine-readable Corresponding Source under the terms of this License, + in one of these ways: + . + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + . + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + . + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + . + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + . + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + . + A separable portion of the object code, whose source code is excluded + from the Corresponding Source as a System Library, need not be + included in conveying the object code work. + . + A "User Product" is either (1) a "consumer product", which means any + tangible personal property which is normally used for personal, family, + or household purposes, or (2) anything designed or sold for incorporation + into a dwelling. In determining whether a product is a consumer product, + doubtful cases shall be resolved in favor of coverage. For a particular + product received by a particular user, "normally used" refers to a + typical or common use of that class of product, regardless of the status + of the particular user or of the way in which the particular user + actually uses, or expects or is expected to use, the product. A product + is a consumer product regardless of whether the product has substantial + commercial, industrial or non-consumer uses, unless such uses represent + the only significant mode of use of the product. + . + "Installation Information" for a User Product means any methods, + procedures, authorization keys, or other information required to install + and execute modified versions of a covered work in that User Product from + a modified version of its Corresponding Source. The information must + suffice to ensure that the continued functioning of the modified object + code is in no case prevented or interfered with solely because + modification has been made. + . + If you convey an object code work under this section in, or with, or + specifically for use in, a User Product, and the conveying occurs as + part of a transaction in which the right of possession and use of the + User Product is transferred to the recipient in perpetuity or for a + fixed term (regardless of how the transaction is characterized), the + Corresponding Source conveyed under this section must be accompanied + by the Installation Information. But this requirement does not apply + if neither you nor any third party retains the ability to install + modified object code on the User Product (for example, the work has + been installed in ROM). + . + The requirement to provide Installation Information does not include a + requirement to continue to provide support service, warranty, or updates + for a work that has been modified or installed by the recipient, or for + the User Product in which it has been modified or installed. Access to a + network may be denied when the modification itself materially and + adversely affects the operation of the network or violates the rules and + protocols for communication across the network. + . + Corresponding Source conveyed, and Installation Information provided, + in accord with this section must be in a format that is publicly + documented (and with an implementation available to the public in + source code form), and must require no special password or key for + unpacking, reading or copying. + . + 7. Additional Terms. + . + "Additional permissions" are terms that supplement the terms of this + License by making exceptions from one or more of its conditions. + Additional permissions that are applicable to the entire Program shall + be treated as though they were included in this License, to the extent + that they are valid under applicable law. If additional permissions + apply only to part of the Program, that part may be used separately + under those permissions, but the entire Program remains governed by + this License without regard to the additional permissions. + . + When you convey a copy of a covered work, you may at your option + remove any additional permissions from that copy, or from any part of + it. (Additional permissions may be written to require their own + removal in certain cases when you modify the work.) You may place + additional permissions on material, added by you to a covered work, + for which you have or can give appropriate copyright permission. + . + Notwithstanding any other provision of this License, for material you + add to a covered work, you may (if authorized by the copyright holders of + that material) supplement the terms of this License with terms: + . + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + . + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + . + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + . + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + . + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + . + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + . + All other non-permissive additional terms are considered "further + restrictions" within the meaning of section 10. If the Program as you + received it, or any part of it, contains a notice stating that it is + governed by this License along with a term that is a further + restriction, you may remove that term. If a license document contains + a further restriction but permits relicensing or conveying under this + License, you may add to a covered work material governed by the terms + of that license document, provided that the further restriction does + not survive such relicensing or conveying. + . + If you add terms to a covered work in accord with this section, you + must place, in the relevant source files, a statement of the + additional terms that apply to those files, or a notice indicating + where to find the applicable terms. + . + Additional terms, permissive or non-permissive, may be stated in the + form of a separately written license, or stated as exceptions; + the above requirements apply either way. + . + 8. Termination. + . + You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or + modify it is void, and will automatically terminate your rights under + this License (including any patent licenses granted under the third + paragraph of section 11). + . + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the copyright + holder fails to notify you of the violation by some reasonable means + prior to 60 days after the cessation. + . + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from that + copyright holder, and you cure the violation prior to 30 days after + your receipt of the notice. + . + Termination of your rights under this section does not terminate the + licenses of parties who have received copies or rights from you under + this License. If your rights have been terminated and not permanently + reinstated, you do not qualify to receive new licenses for the same + material under section 10. + . + 9. Acceptance Not Required for Having Copies. + . + You are not required to accept this License in order to receive or + run a copy of the Program. Ancillary propagation of a covered work + occurring solely as a consequence of using peer-to-peer transmission + to receive a copy likewise does not require acceptance. However, + nothing other than this License grants you permission to propagate or + modify any covered work. These actions infringe copyright if you do + not accept this License. Therefore, by modifying or propagating a + covered work, you indicate your acceptance of this License to do so. + . + 10. Automatic Licensing of Downstream Recipients. + . + Each time you convey a covered work, the recipient automatically + receives a license from the original licensors, to run, modify and + propagate that work, subject to this License. You are not responsible + for enforcing compliance by third parties with this License. + . + An "entity transaction" is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a covered + work results from an entity transaction, each party to that + transaction who receives a copy of the work also receives whatever + licenses to the work the party's predecessor in interest had or could + give under the previous paragraph, plus a right to possession of the + Corresponding Source of the work from the predecessor in interest, if + the predecessor has it or can get it with reasonable efforts. + . + You may not impose any further restrictions on the exercise of the + rights granted or affirmed under this License. For example, you may + not impose a license fee, royalty, or other charge for exercise of + rights granted under this License, and you may not initiate litigation + (including a cross-claim or counterclaim in a lawsuit) alleging that + any patent claim is infringed by making, using, selling, offering for + sale, or importing the Program or any portion of it. + . + 11. Patents. + . + A "contributor" is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. The + work thus licensed is called the contributor's "contributor version". + . + A contributor's "essential patent claims" are all patent claims + owned or controlled by the contributor, whether already acquired or + hereafter acquired, that would be infringed by some manner, permitted + by this License, of making, using, or selling its contributor version, + but do not include claims that would be infringed only as a + consequence of further modification of the contributor version. For + purposes of this definition, "control" includes the right to grant + patent sublicenses in a manner consistent with the requirements of + this License. . - THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE APACHE - SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Each contributor grants you a non-exclusive, worldwide, royalty-free + patent license under the contributor's essential patent claims, to + make, use, sell, offer for sale, import and otherwise run, modify and + propagate the contents of its contributor version. + . + In the following three paragraphs, a "patent license" is any express + agreement or commitment, however denominated, not to enforce a patent + (such as an express permission to practice a patent or covenant not to + sue for patent infringement). To "grant" such a patent license to a + party means to make such an agreement or commitment not to enforce a + patent against the party. + . + If you convey a covered work, knowingly relying on a patent license, + and the Corresponding Source of the work is not available for anyone + to copy, free of charge and under the terms of this License, through a + publicly available network server or other readily accessible means, + then you must either (1) cause the Corresponding Source to be so + available, or (2) arrange to deprive yourself of the benefit of the + patent license for this particular work, or (3) arrange, in a manner + consistent with the requirements of this License, to extend the patent + license to downstream recipients. "Knowingly relying" means you have + actual knowledge that, but for the patent license, your conveying the + covered work in a country, or your recipient's use of the covered work + in a country, would infringe one or more identifiable patents in that + country that you have reason to believe are valid. + . + If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties + receiving the covered work authorizing them to use, propagate, modify + or convey a specific copy of the covered work, then the patent license + you grant is automatically extended to all recipients of the covered + work and works based on it. + . + A patent license is "discriminatory" if it does not include within + the scope of its coverage, prohibits the exercise of, or is + conditioned on the non-exercise of one or more of the rights that are + specifically granted under this License. You may not convey a covered + work if you are a party to an arrangement with a third party that is + in the business of distributing software, under which you make payment + to the third party based on the extent of your activity of conveying + the work, and under which the third party grants, to any of the + parties who would receive the covered work from you, a discriminatory + patent license (a) in connection with copies of the covered work + conveyed by you (or copies made from those copies), or (b) primarily + for and in connection with specific products or compilations that + contain the covered work, unless you entered into that arrangement, + or that patent license was granted, prior to 28 March 2007. + . + Nothing in this License shall be construed as excluding or limiting + any implied license or other defenses to infringement that may + otherwise be available to you under applicable patent law. . - --- end of LICENSE --- + 12. No Surrender of Others' Freedom. . - ------------------------------------------------------------------------------ + If conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot convey a + covered work so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you may + not convey it at all. For example, if you agree to terms that obligate you + to collect a royalty for further conveying from those to whom you convey + the Program, the only way you could satisfy both those terms and this + License would be to refrain entirely from conveying the Program. . - %% This notice is provided with respect to SAX 2.0.1, which may be included - with JRE 8, JDK 8, and OpenJDK 8. + 13. Use with the GNU Affero General Public License. . - --- begin of LICENSE --- + Notwithstanding any other provision of this License, you have + permission to link or combine any covered work with a work licensed + under version 3 of the GNU Affero General Public License into a single + combined work, and to convey the resulting work. The terms of this + License will continue to apply to the part which is the covered work, + but the special requirements of the GNU Affero General Public License, + section 13, concerning interaction through a network will apply to the + combination as such. . - SAX is free! + 14. Revised Versions of this License. . - In fact, it's not possible to own a license to SAX, since it's been placed in - the public domain. + The Free Software Foundation may publish revised and/or new versions of + the GNU General Public License from time to time. Such new versions will + be similar in spirit to the present version, but may differ in detail to + address new problems or concerns. . - No Warranty + Each version is given a distinguishing version number. If the + Program specifies that a certain numbered version of the GNU General + Public License "or any later version" applies to it, you have the + option of following the terms and conditions either of that numbered + version or of any later version published by the Free Software + Foundation. If the Program does not specify a version number of the + GNU General Public License, you may choose any version ever published + by the Free Software Foundation. . - Because SAX is released to the public domain, there is no warranty for the - design or for the software implementation, to the extent permitted by - applicable law. Except when otherwise stated in writing the copyright holders - and/or other parties provide SAX "as is" without warranty of any kind, either - expressed or implied, including, but not limited to, the implied warranties - of merchantability and fitness for a particular purpose. The entire risk as - to the quality and performance of SAX is with you. Should SAX prove - defective, you assume the cost of all necessary servicing, repair or - correction. + If the Program specifies that a proxy can decide which future + versions of the GNU General Public License can be used, that proxy's + public statement of acceptance of a version permanently authorizes you + to choose that version for the Program. . - In no event unless required by applicable law or agreed to in writing will - any copyright holder, or any other party who may modify and/or redistribute - SAX, be liable to you for damages, including any general, special, incidental - or consequential damages arising out of the use or inability to use SAX - (including but not limited to loss of data or data being rendered inaccurate - or losses sustained by you or third parties or a failure of the SAX to - operate with any other programs), even if such holder or other party has been - advised of the possibility of such damages. + Later license versions may give you additional or different + permissions. However, no additional obligations are imposed on any + author or copyright holder as a result of your choosing to follow a + later version. . - Copyright Disclaimers + 15. Disclaimer of Warranty. . - This page includes statements to that effect by David Megginson, who would - have been able to claim copyright for the original work. SAX 1.0 + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM + IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF + ALL NECESSARY SERVICING, REPAIR OR CORRECTION. . - Version 1.0 of the Simple API for XML (SAX), created collectively by the - membership of the XML-DEV mailing list, is hereby released into the public - domain. + 16. Limitation of Liability. . - No one owns SAX: you may use it freely in both commercial and non-commercial - applications, bundle it with your software distribution, include it on a - CD-ROM, list the source code in a book, mirror the documentation at your own - web site, or use it in any other way you see fit. + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGES. . - David Megginson, sax@megginson.com - 1998-05-11 + 17. Interpretation of Sections 15 and 16. . - SAX 2.0 + If the disclaimer of warranty and limitation of liability provided + above cannot be given local legal effect according to their terms, + reviewing courts shall apply local law that most closely approximates + an absolute waiver of all civil liability in connection with the + Program, unless a warranty or assumption of liability accompanies a + copy of the Program in return for a fee. . - I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and - release all of the SAX 2.0 source code, compiled code, and documentation - contained in this distribution into the Public Domain. SAX comes with NO - WARRANTY or guarantee of fitness for any purpose. + END OF TERMS AND CONDITIONS . - David Megginson, david@megginson.com - 2000-05-05 . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to SoftFloat version 2b, which may be - included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM. + %% This notice is provided with respect to Pako v1.0, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Use of any of this software is governed by the terms of the license below: - . - SoftFloat was written by me, John R. Hauser. This work was made possible in - part by the International Computer Science Institute, located at Suite 600, - 1947 Center Street, Berkeley, California 94704. Funding was partially - provided by the National Science Foundation under grant MIP-9311980. The - original version of this code was written as part of a project to build - a fixed-point vector processor in collaboration with the University of - California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. - . - THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort - has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT - TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO - PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL - LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO - FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER - SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, - COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE - SOFTWARE. - . - Derivative works are acceptable, even for commercial purposes, provided - that the minimal documentation requirements stated in the source code are - satisfied. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Sparkle 1.5, - which may be included with JRE 8 on Mac OS X. + Pako License . - --- begin of LICENSE --- - . - Copyright (c) 2012 Sparkle.org and Andy Matuschak + Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2087,495 +3791,129 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + (C) 1995-2013 Jean-loup Gailly and Mark Adler + (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin . - --- end of LICENSE --- + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. . - ------------------------------------------------------------------------------ + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: . - %% Portions licensed from Taligent, Inc. + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. . - ------------------------------------------------------------------------------ . - %% This notice is provided with respect to Thai Dictionary, which may be - included with JRE 8, JDK 8, and OpenJDK 8. . - --- begin of LICENSE --- . - Copyright (C) 1982 The Royal Institute, Thai Royal Government. - . - Copyright (C) 1998 National Electronics and Computer Technology Center, - National Science and Technology Development Agency, - Ministry of Science Technology and Environment, - Thai Royal Government. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1 - which may be included with JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v33, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Unicode Terms of Use + CLDR License . - For the general privacy policy governing access to this site, see the Unicode - Privacy Policy. For trademark usage, see the Unicode® Consortium Name and - Trademark Usage Policy. - . - A. Unicode Copyright. - 1. Copyright © 1991-2013 Unicode, Inc. All rights reserved. - . - 2. Certain documents and files on this website contain a legend indicating - that "Modification is permitted." Any person is hereby authorized, - without fee, to modify such documents and files to create derivative - works conforming to the Unicode® Standard, subject to Terms and - Conditions herein. - . - 3. Any person is hereby authorized, without fee, to view, use, reproduce, - and distribute all documents and files solely for informational - purposes in the creation of products supporting the Unicode Standard, - subject to the Terms and Conditions herein. - . - 4. Further specifications of rights and restrictions pertaining to the use - of the particular set of data files known as the "Unicode Character - Database" can be found in Exhibit 1. - . - 5. Each version of the Unicode Standard has further specifications of - rights and restrictions of use. For the book editions (Unicode 5.0 and - earlier), these are found on the back of the title page. The online - code charts carry specific restrictions. All other files, including - online documentation of the core specification for Unicode 6.0 and - later, are covered under these general Terms of Use. - . - 6. No license is granted to "mirror" the Unicode website where a fee is - charged for access to the "mirror" site. - . - 7. Modification is not permitted with respect to this document. All copies - of this document must be verbatim. - . - B. Restricted Rights Legend. Any technical data or software which is licensed - to the United States of America, its agencies and/or instrumentalities - under this Agreement is commercial technical data or commercial computer - software developed exclusively at private expense as defined in FAR 2.101, - or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, - duplication, or disclosure by the Government is subject to restrictions as - set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov - 1995) and this Agreement. For Software, in accordance with FAR 12-212 or - DFARS 227-7202, as applicable, use, duplication or disclosure by the - Government is subject to the restrictions set forth in this Agreement. - . - C. Warranties and Disclaimers. - 1. This publication and/or website may include technical or typographical - errors or other inaccuracies . Changes are periodically added to the - information herein; these changes will be incorporated in new editions - of the publication and/or website. Unicode may make improvements and/or - changes in the product(s) and/or program(s) described in this - publication and/or website at any time. - . - 2. If this file has been purchased on magnetic or optical media from - Unicode, Inc. the sole and exclusive remedy for any claim will be - exchange of the defective media within ninety (90) days of original - purchase. - . - 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS - PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, - OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. - UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR - OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH - ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. - . - D. Waiver of Damages. In no event shall Unicode or its licensors be liable for - any special, incidental, indirect or consequential damages of any kind, or - any damages whatsoever, whether or not Unicode was advised of the - possibility of the damage, including, without limitation, those resulting - from the following: loss of use, data or profits, in connection with the - use, modification or distribution of this information or its derivatives. - . - E.Trademarks & Logos. - 1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, - Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of - Unicode, Inc. Use of the information and materials found on this - website indicates your acknowledgement of Unicode, Inc.’s exclusive - worldwide rights in the Unicode Word Mark, the Unicode Logo, and the - Unicode trade names. - . - 2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark - Policy”) are incorporated herein by reference and you agree to abide by - the provisions of the Trademark Policy, which may be changed from time - to time in the sole discretion of Unicode, Inc. - . - 3. All third party trademarks referenced herein are the property of their - respective owners. - . - Miscellaneous. - 1. Jurisdiction and Venue. This server is operated from a location in the - State of California, United States of America. Unicode makes no - representation that the materials are appropriate for use in other - locations. If you access this server from other locations, you are - responsible for compliance with local laws. This Agreement, all use of - this site and any claims and damages resulting from use of this site are - governed solely by the laws of the State of California without regard to - any principles which would apply the laws of a different jurisdiction. - The user agrees that any disputes regarding this site shall be resolved - solely in the courts located in Santa Clara County, California. The user - agrees said courts have personal jurisdiction and agree to waive any - right to transfer the dispute to any other forum. - . - 2. Modification by Unicode. Unicode shall have the right to modify this - Agreement at any time by posting it to this site. The user may not - assign any part of this Agreement without Unicode’s prior written - consent. - . - 3. Taxes. The user agrees to pay any taxes arising from access to this - website or use of the information herein, except for those based on - Unicode’s net income. - . - 4. Severability. If any provision of this Agreement is declared invalid or - unenforceable, the remaining provisions of this Agreement shall remain - in effect. . - 5. Entire Agreement. This Agreement constitutes the entire agreement - between the parties. . - EXHIBIT 1 UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - . Unicode Data Files include all data files under the directories - http://www.unicode.org/Public/, http://www.unicode.org/reports/, and - http://www.unicode.org/cldr/data/. Unicode Data Files do not include PDF - online code charts under the directory http://www.unicode.org/Public/. - Software includes any source code published in the Unicode Standard or under - the directories http://www.unicode.org/Public/, - http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. - . - NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, - INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA - FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO - BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT - AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR - SOFTWARE. + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + Unicode Data Files do not include PDF online code charts under the + directory http://www.unicode.org/Public/. + . + Software includes any source code published in the Unicode Standard + or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + http://www.unicode.org/cldr/data/, + http://source.icu-project.org/repos/icu/, and + http://www.unicode.org/utility/trac/browser/. + . + NOTICE TO USER: Carefully read the following legal agreement. + BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S + DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), + YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. + IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE + THE DATA FILES OR SOFTWARE. . COPYRIGHT AND PERMISSION NOTICE . - Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the - Terms of Use in http://www.unicode.org/copyright.html. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of the Unicode data files and any associated documentation (the "Data Files") - or Unicode software and any associated documentation (the "Software") to deal - in the Data Files or Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, and/or - sell copies of the Data Files or Software, and to permit persons to whom the - Data Files or Software are furnished to do so, provided that (a) the above - copyright notice(s) and this permission notice appear with all copies of the - Data Files or Software, (b) both the above copyright notice(s) and this - permission notice appear in associated documentation, and (c) there is clear - notice in each modified Data File or in the Software as well as in the - documentation associated with the Data File(s) or Software that the data or - software has been modified. - . - THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY - KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD - PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN - THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL - DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE - DATA FILES OR SOFTWARE. - . - Except as contained in this notice, the name of a copyright holder shall not - be used in advertising or otherwise to promote the sale, use or other dealings - in these Data Files or Software without prior written authorization of the - copyright holder. + Copyright © 1991-2018 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html. . - Unicode and the Unicode logo are trademarks of Unicode, Inc. in the United - States and other countries. All third party trademarks referenced herein are - the property of their respective owners. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to UPX v3.01, which may be included - with JRE 8 on Windows. - . - --- begin of LICENSE --- - . - Use of any of this software is governed by the terms of the license below: - . - . - ooooo ooo ooooooooo. ooooooo ooooo - `888' `8' `888 `Y88. `8888 d8' - 888 8 888 .d88' Y888..8P - 888 8 888ooo88P' `8888' - 888 8 888 .8PY888. - `88. .8' 888 d8' `888b - `YbodP' o888o o888o o88888o - . - . - The Ultimate Packer for eXecutables - Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar - http://wildsau.idv.uni-linz.ac.at/mfx/upx.html - http://www.nexus.hu/upx - http://upx.tsx.org - . - . - PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN - TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION. - . - . - ABSTRACT - ======== - . - UPX and UCL are copyrighted software distributed under the terms - of the GNU General Public License (hereinafter the "GPL"). - . - The stub which is imbedded in each UPX compressed program is part - of UPX and UCL, and contains code that is under our copyright. The - terms of the GNU General Public License still apply as compressing - a program is a special form of linking with our stub. - . - As a special exception we grant the free usage of UPX for all - executables, including commercial programs. - See below for details and restrictions. - . - . - COPYRIGHT - ========= - . - UPX and UCL are copyrighted software. All rights remain with the authors. - . - UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer - UPX is Copyright (C) 1996-2000 Laszlo Molnar - . - UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer - . - . - GNU GENERAL PUBLIC LICENSE - ========================== - . - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - . - UPX and UCL are distributed in the hope that they will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - . - . - SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES - ============================================ - . - The stub which is imbedded in each UPX compressed program is part - of UPX and UCL, and contains code that is under our copyright. The - terms of the GNU General Public License still apply as compressing - a program is a special form of linking with our stub. - . - Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special - permission to freely use and distribute all UPX compressed programs - (including commercial ones), subject to the following restrictions: - . - 1. You must compress your program with a completely unmodified UPX - version; either with our precompiled version, or (at your option) - with a self compiled version of the unmodified UPX sources as - distributed by us. - 2. This also implies that the UPX stub must be completely unmodfied, i.e. - the stub imbedded in your compressed program must be byte-identical - to the stub that is produced by the official unmodified UPX version. - 3. The decompressor and any other code from the stub must exclusively get - used by the unmodified UPX stub for decompressing your program at - program startup. No portion of the stub may get read, copied, - called or otherwise get used or accessed by your program. - . - . - ANNOTATIONS - =========== - . - - You can use a modified UPX version or modified UPX stub only for - programs that are compatible with the GNU General Public License. - . - - We grant you special permission to freely use and distribute all UPX - compressed programs. But any modification of the UPX stub (such as, - but not limited to, removing our copyright string or making your - program non-decompressible) will immediately revoke your right to - use and distribute a UPX compressed program. - . - - UPX is not a software protection tool; by requiring that you use - the unmodified UPX version for your proprietary programs we - make sure that any user can decompress your program. This protects - both you and your users as nobody can hide malicious code - - any program that cannot be decompressed is highly suspicious - by definition. - . - - You can integrate all or part of UPX and UCL into projects that - are compatible with the GNU GPL, but obviously you cannot grant - any special exceptions beyond the GPL for our code in your project. - . - - We want to actively support manufacturers of virus scanners and - similar security software. Please contact us if you would like to - incorporate parts of UPX or UCL into such a product. - . - . - . - Markus F.X.J. Oberhumer Laszlo Molnar - markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu - . - Linz, Austria, 25 Feb 2000 - . - Additional License(s) - . - The UPX license file is at http://upx.sourceforge.net/upx-license.html. - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to Xfree86-VidMode Extension 1.0, - which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. - . - --- begin of LICENSE --- - . - Version 1.1 of XFree86 ProjectLicence. - . - Copyright (C) 1994-2004 The XFree86 Project, Inc. All rights reserved. - . - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicence, and/or sell - copies of the Software, and to permit persons to whom the Software is furnished - to do so,subject to the following conditions: - . - 1. Redistributions of source code must retain the above copyright - notice,this list of conditions, and the following disclaimer. + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution, and in the same place - and form as other copyright, license and disclaimer information. + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. . - 3. The end-user documentation included with the redistribution, if any,must - include the following acknowledgment: "This product includes - software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and - its contributors", in the same place and form as other third-party - acknowledgments. Alternately, this acknowledgment may appear in the software - itself, in the same form and location as other such third-party - acknowledgments. + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. . - 4. Except as contained in this notice, the name of The XFree86 Project,Inc - shall not be used in advertising or otherwise to promote the sale, use - or other dealings in this Software without prior written authorization from - The XFree86 Project, Inc. . - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to X Window System 6.8.2, which may be - included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. + %% This notice is provided with respect to Thai Dictionary, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - Licenses - The X.Org Foundation March 2004 - . - 1. Introduction - . - The X.org Foundation X Window System distribution is a compilation of code and - documentation from many sources. This document is intended primarily as a - guide to the licenses used in the distribution: you must check each file - and/or package for precise redistribution terms. None-the-less, this summary - may be useful to many users. No software incorporating the XFree86 1.1 license - has been incorporated. - . - This document is based on the compilation from XFree86. - . - 2. XFree86 License - . - XFree86 code without an explicit copyright is covered by the following - copyright/license: - . - Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - . - Except as contained in this notice, the name of the XFree86 Project shall not - be used in advertising or otherwise to promote the sale, use or other dealings - in this Software without prior written authorization from the XFree86 Project. + Thai Dictionary License . - 3. Other Licenses . - Portions of code are covered by the following licenses/copyrights. See - individual files for the copyright dates. - . - 3.1. X/MIT Copyrights - . - 3.1.1. X Consortium + Copyright (C) 1982 The Royal Institute, Thai Royal Government. . - Copyright (C) X Consortium + Copyright (C) 1998 National Electronics and Computer Technology Center, + National Science and Technology Development Agency, + Ministry of Science Technology and Environment, + Thai Royal Government. . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2589,793 +3927,93 @@ . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X - CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - . - Except as contained in this notice, the name of the X Consortium shall not be - used in advertising or otherwise to promote the sale, use or other dealings in - this Software without prior written authorization from the X Consortium. - . - X Window System is a trademark of X Consortium, Inc. - . - 3.1.2. The Open Group - . - Copyright The Open Group - . - Permission to use, copy, modify, distribute, and sell this software and its - documentation for any purpose is hereby granted without fee, provided that the - above copyright notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting documentation. - . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - . - Except as contained in this notice, the name of The Open Group shall not be - used in advertising or otherwise to promote the sale, use or other dealings in - this Software without prior written authorization from The Open Group. 3.2. - Berkeley-based copyrights: - . - o - 3.2.1. General - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. 3.2.2. UCB/LBL - . - Copyright (c) 1993 The Regents of the University of California. All rights - reserved. - . - This software was developed by the Computer Systems Engineering group at - Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to - Berkeley. - . - All advertising materials mentioning features or use of this software must - display the following acknowledgement: This product includes software - developed by the University of California, Lawrence Berkeley Laboratory. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: This product includes software - developed by the University of California, Berkeley and its contributors. - . - 4. Neither the name of the University nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.3. The - NetBSD Foundation, Inc. - . - Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved. - . - This code is derived from software contributed to The NetBSD Foundation by Ben - Collver - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: This product includes software - developed by the NetBSD Foundation, Inc. and its contributors. - . - 4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS - IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.4. Theodore - Ts'o. - . - Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights - reserved. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, - and the entire permission notice in its entirety, including the disclaimer - of warranties. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. he name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO - EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. 3.2.5. Theo de Raadt and Damien Miller + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. . - Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c) - 2001-2002 Damien Miller. All rights reserved. . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: . - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + --- end of LICENSE --- . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Double-conversion v1.1.5, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. 3.2.6. Todd C. Miller + --- begin of LICENSE --- . - Copyright (c) 1998 Todd C. Miller + Double-conversion License . - Permission to use, copy, modify, and distribute this software for any purpose - with or without fee is hereby granted, provided that the above copyright - notice and this permission notice appear in all copies. + https://raw.githubusercontent.com/google/double-conversion/master/LICENSE . - THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 3.2.7. Thomas - Winischhofer . - Copyright (C) 2001-2004 Thomas Winischhofer . + Copyright 2006-2011, the V8 project authors. All rights reserved. Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. 3.3. NVIDIA Corp - . - Copyright (c) 1996 NVIDIA, Corp. All rights reserved. - . - NOTICE TO USER: The source code is copyrighted under U.S. and international - laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as design - patents pending on the design and interface of the NV chips. Users and - possessors of this source code are hereby granted a nonexclusive, royalty-free - copyright and design patent license to use this code in individual and - commercial software. - . - Any use of this source code must include, in the user documentation and - internal comments to the code, notices to the end user as follows: - . - Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. and - foreign countries. - . - NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE - CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED - WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO - THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE - FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. 3.4. GLX Public - License - . - GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License") - . - Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby - grants permission to Recipient (defined below), under Recipient's copyrights - in the Original Software (defined below), to use, copy, modify, merge, - publish, distribute, sublicense and/or sell copies of Subject Software - (defined below), and to permit persons to whom the Subject Software is - furnished in accordance with this License to do the same, subject to all of - the following terms and conditions, which Recipient accepts by engaging in any - such use, copying, modifying, merging, publishing, distributing, sublicensing - or selling: - . - 1. Definitions. - . - (a) "Original Software" means source code of computer software code which - is described in Exhibit A as Original Software. - . - (b) "Modifications" means any addition to or deletion from the substance - or structure of either the Original Software or any previous - Modifications. When Subject Software is released as a series of files, a - Modification means (i) any addition to or deletion from the contents of a - file containing Original Software or previous Modifications and (ii) any - new file that contains any part of the Original Code or previous - Modifications. - . - (c) "Subject Software" means the Original Software or Modifications or the - combination of the Original Software and Modifications, or portions of any - of the foregoing. - . - (d) "Recipient" means an individual or a legal entity exercising rights - under, and complying with all of the terms of, this License. For legal - entities, "Recipient" includes any entity which controls, is controlled - by, or is under common control with Recipient. For purposes of this - definition, "control" of an entity means (a) the power, direct or - indirect, to direct or manage such entity, or (b) ownership of fifty - percent (50%) or more of the outstanding shares or beneficial ownership of - such entity. - . - 2. Redistribution of Source Code Subject to These Terms. Redistributions of - Subject Software in source code form must retain the notice set forth in - Exhibit A, below, in every file. A copy of this License must be included in - any documentation for such Subject Software where the recipients' rights - relating to Subject Software are described. Recipient may distribute the - source code version of Subject Software under a license of Recipient's choice, - which may contain terms different from this License, provided that (i) - Recipient is in compliance with the terms of this License, and (ii) the - license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13 of - this License, which terms may not be modified or superseded by any other terms - of such license. If Recipient distributes the source code version under a - different license Recipient must make it absolutely clear that any terms which - differ from this License are offered by Recipient alone, not by SGI. Recipient - hereby agrees to indemnify SGI for any liability incurred by SGI as a result - of any such terms Recipient offers. - . - 3. Redistribution in Executable Form. The notice set forth in Exhibit A must - be conspicuously included in any notice in an executable version of Subject - Software, related documentation or collateral in which Recipient describes the - user's rights relating to the Subject Software. Recipient may distribute the - executable version of Subject Software under a license of Recipient's choice, - which may contain terms different from this License, provided that (i) - Recipient is in compliance with the terms of this License, and (ii) the - license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of - this License, which terms may not be modified or superseded by any other terms - of such license. If Recipient distributes the executable version under a - different license Recipient must make it absolutely clear that any terms which - differ from this License are offered by Recipient alone, not by SGI. Recipient - hereby agrees to indemnify SGI for any liability incurred by SGI as a result - of any such terms Recipient offers. - . - 4. Termination. This License and the rights granted hereunder will terminate - automatically if Recipient fails to comply with terms herein and fails to cure - such breach within 30 days of the breach. Any sublicense to the Subject - Software which is properly granted shall survive any termination of this - License absent termination by the terms of such sublicense. Provisions which, - by their nature, must remain in effect beyond the termination of this License - shall survive. - . - 5. No Trademark Rights. This License does not grant any rights to use any - trade name, trademark or service mark whatsoever. No trade name, trademark or - service mark of SGI may be used to endorse or promote products derived from - the Subject Software without prior written permission of SGI. - . - 6. No Other Rights. This License does not grant any rights with respect to the - OpenGL API or to any software or hardware implementation thereof or to any - other software whatsoever, nor shall any other rights or licenses not - expressly granted hereunder arise by implication, estoppel or otherwise with - respect to the Subject Software. Title to and ownership of the Original - Software at all times remains with SGI. All rights in the Original Software - not expressly granted under this License are reserved. - . - 7. Compliance with Laws; Non-Infringement. Recipient shall comply with all - applicable laws and regulations in connection with use and distribution of the - Subject Software, including but not limited to, all export and import control - laws and regulations of the U.S. government and other countries. Recipient may - not distribute Subject Software that (i) in any way infringes (directly or - contributorily) the rights (including patent, copyright, trade secret, - trademark or other intellectual property rights of any kind) of any other - person or entity or (ii) breaches any representation or warranty, express, - implied or statutory, which under any applicable law it might be deemed to - have been distributed. - . - 8. Claims of Infringement. If Recipient at any time has knowledge of any one - or more third party claims that reproduction, modification, use, distribution, - import or sale of Subject Software (including particular functionality or code - incorporated in Subject Software) infringes the third party's intellectual - property rights, Recipient must place in a well-identified web page bearing - the title "LEGAL" a description of each such claim and a description of the - party making each such claim in sufficient detail that a user of the Subject - Software will know whom to contact regarding the claim. Also, upon gaining - such knowledge of any such claim, Recipient must conspicuously include the URL - for such web page in the Exhibit A notice required under Sections 2 and 3, - above, and in the text of any related documentation, license agreement or - collateral in which Recipient describes end user's rights relating to the - Subject Software. If Recipient obtains such knowledge after it makes Subject - Software available to any other person or entity, Recipient shall take other - steps (such as notifying appropriate mailing lists or newsgroups) reasonably - calculated to inform those who received the Subject Software that new - knowledge has been obtained. - . - 9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT - LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, - MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO - RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE - PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY - SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED - HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - . - 10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, - WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), - CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY - DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK - STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF - THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY - TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO - THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT - ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. - . - 11. Indemnity. Recipient shall be solely responsible for damages arising, - directly or indirectly, out of its utilization of rights under this License. - Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from - and against any loss, liability, damages, costs or expenses (including the - payment of reasonable attorneys fees) arising out of Recipient's use, - modification, reproduction and distribution of the Subject Software or out of - any representation or warranty made by Recipient. - . - 12. U.S. Government End Users. The Subject Software is a "commercial item" - consisting of "commercial computer software" as such terms are defined in - title 48 of the Code of Federal Regulations and all U.S. Government End Users - acquire only the rights set forth in this License and are subject to the terms - of this License. - . - 13. Miscellaneous. This License represents the complete agreement concerning - subject matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed so as to achieve as nearly as - possible the same economic effect as the original provision and the remainder - of this License will remain in effect. This License shall be governed by and - construed in accordance with the laws of the United States and the State of - California as applied to agreements entered into and to be performed entirely - within California between California residents. Any litigation relating to - this License shall be subject to the exclusive jurisdiction of the Federal - Courts of the Northern District of California (or, absent subject matter - jurisdiction in such courts, the courts of the State of California), with - venue lying exclusively in Santa Clara County, California, with the losing - party responsible for costs, including without limitation, court costs and - reasonable attorneys fees and expenses. The application of the United Nations - Convention on Contracts for the International Sale of Goods is expressly - excluded. Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this License. - . - Exhibit A - . - The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and 13 - of the GLX Public License Version 1.0 (the "License"). You may not use this - file except in compliance with those sections of the License. You may obtain a - copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N. - Shoreline Blvd., Mountain View, CA 94043 or at - http://www.sgi.com/software/opensource/glx/license.html. - . - Software distributed under the License is distributed on an "AS IS" basis. ALL - WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON- - INFRINGEMENT. See the License for the specific language governing rights and - limitations under the License. - . - The Original Software is GLX version 1.2 source code, released February, 1999. - The developer of the Original Software is Silicon Graphics, Inc. Those - portions of the Subject Software created by Silicon Graphics, Inc. are - Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. 3.5. CID - Font Code Public License - . - CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License") - . - Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI") - hereby grants permission to Recipient (defined below), under SGI's copyrights - in the Original Software (defined below), to use, copy, modify, merge, - publish, distribute, sublicense and/or sell copies of Subject Software - (defined below) in both source code and executable form, and to permit persons - to whom the Subject Software is furnished in accordance with this License to - do the same, subject to all of the following terms and conditions, which - Recipient accepts by engaging in any such use, copying, modifying, merging, - publication, distributing, sublicensing or selling: - . - 1. Definitions. - . - a. "Original Software" means source code of computer software code that is - described in Exhibit A as Original Software. - . - b. "Modifications" means any addition to or deletion from the substance or - structure of either the Original Software or any previous Modifications. - When Subject Software is released as a series of files, a Modification - means (i) any addition to or deletion from the contents of a file - containing Original Software or previous Modifications and (ii) any new - file that contains any part of the Original Code or previous - Modifications. - . - c. "Subject Software" means the Original Software or Modifications or the - combination of the Original Software and Modifications, or portions of any - of the foregoing. - . - d. "Recipient" means an individual or a legal entity exercising rights - under the terms of this License. For legal entities, "Recipient" includes - any entity that controls, is controlled by, or is under common control - with Recipient. For purposes of this definition, "control" of an entity - means (i) the power, direct or indirect, to direct or manage such entity, - or (ii) ownership of fifty percent (50%) or more of the outstanding shares - or beneficial ownership of such entity. - . - e. "Required Notice" means the notice set forth in Exhibit A to this - License. - . - f. "Accompanying Technology" means any software or other technology that - is not a Modification and that is distributed or made publicly available - by Recipient with the Subject Software. Separate software files that do - not contain any Original Software or any previous Modification shall not - be deemed a Modification, even if such software files are aggregated as - part of a product, or in any medium of storage, with any file that does - contain Original Software or any previous Modification. - . - 2. License Terms. All distribution of the Subject Software must be made - subject to the terms of this License. A copy of this License and the Required - Notice must be included in any documentation for Subject Software where - Recipient's rights relating to Subject Software and/or any Accompanying - Technology are described. Distributions of Subject Software in source code - form must also include the Required Notice in every file distributed. In - addition, a ReadMe file entitled "Important Legal Notice" must be distributed - with each distribution of one or more files that incorporate Subject Software. - That file must be included with distributions made in both source code and - executable form. A copy of the License and the Required Notice must be - included in that file. Recipient may distribute Accompanying Technology under - a license of Recipient's choice, which may contain terms different from this - License, provided that (i) Recipient is in compliance with the terms of this - License, (ii) such other license terms do not modify or supersede the terms of - this License as applicable to the Subject Software, (iii) Recipient hereby - indemnifies SGI for any liability incurred by SGI as a result of the - distribution of Accompanying Technology or the use of other license terms. - . - 3. Termination. This License and the rights granted hereunder will terminate - automatically if Recipient fails to comply with terms herein and fails to cure - such breach within 30 days of the breach. Any sublicense to the Subject - Software that is properly granted shall survive any termination of this - License absent termination by the terms of such sublicense. Provisions which, - by their nature, must remain in effect beyond the termination of this License - shall survive. - . - 4. Trademark Rights. This License does not grant any rights to use any trade - name, trademark or service mark whatsoever. No trade name, trademark or - service mark of SGI may be used to endorse or promote products derived from or - incorporating any Subject Software without prior written permission of SGI. - . - 5. No Other Rights. No rights or licenses not expressly granted hereunder - shall arise by implication, estoppel or otherwise. Title to and ownership of - the Original Software at all times remains with SGI. All rights in the - Original Software not expressly granted under this License are reserved. - . - 6. Compliance with Laws; Non-Infringement. Recipient shall comply with all - applicable laws and regulations in connection with use and distribution of the - Subject Software, including but not limited to, all export and import control - laws and regulations of the U.S. government and other countries. Recipient may - not distribute Subject Software that (i) in any way infringes (directly or - contributorily) the rights (including patent, copyright, trade secret, - trademark or other intellectual property rights of any kind) of any other - person or entity, or (ii) breaches any representation or warranty, express, - implied or statutory, which under any applicable law it might be deemed to - have been distributed. - . - 7. Claims of Infringement. If Recipient at any time has knowledge of any one - or more third party claims that reproduction, modification, use, distribution, - import or sale of Subject Software (including particular functionality or code - incorporated in Subject Software) infringes the third party's intellectual - property rights, Recipient must place in a well-identified web page bearing - the title "LEGAL" a description of each such claim and a description of the - party making each such claim in sufficient detail that a user of the Subject - Software will know whom to contact regarding the claim. Also, upon gaining - such knowledge of any such claim, Recipient must conspicuously include the URL - for such web page in the Required Notice, and in the text of any related - documentation, license agreement or collateral in which Recipient describes - end user's rights relating to the Subject Software. If Recipient obtains such - knowledge after it makes Subject Software available to any other person or - entity, Recipient shall take other steps (such as notifying appropriate - mailing lists or newsgroups) reasonably calculated to provide such knowledge - to those who received the Subject Software. - . - 8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT - LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, - MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO - RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE - PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY - SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED - HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - . - 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, - WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), - CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT - ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND - LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED. - . - 10. Indemnity. Recipient shall be solely responsible for damages arising, - directly or indirectly, out of its utilization of rights under this License. - Recipient will defend, indemnify and hold SGI and its successors and assigns - harmless from and against any loss, liability, damages, costs or expenses - (including the payment of reasonable attorneys fees) arising out of - (Recipient's use, modification, reproduction and distribution of the Subject - Software or out of any representation or warranty made by Recipient. - . - 11. U.S. Government End Users. The Subject Software is a "commercial item" - consisting of "commercial computer software" as such terms are defined in - title 48 of the Code of Federal Regulations and all U.S. Government End Users - acquire only the rights set forth in this License and are subject to the terms - of this License. - . - 12. Miscellaneous. This License represents the complete agreement concerning - subject matter hereof. If any provision of this License is held to be - unenforceable by any judicial or administrative authority having proper - jurisdiction with respect thereto, such provision shall be reformed so as to - achieve as nearly as possible the same economic effect as the original - provision and the remainder of this License will remain in effect. This - License shall be governed by and construed in accordance with the laws of the - United States and the State of California as applied to agreements entered - into and to be performed entirely within California between California - residents. Any litigation relating to this License shall be subject to the - exclusive jurisdiction of the Federal Courts of the Northern District of - California (or, absent subject matter jurisdiction in such courts, the courts - of the State of California), with venue lying exclusively in Santa Clara - County, California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys fees and expenses. - The application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or regulation that - provides that the language of a contract shall be construed against the - drafter shall not apply to this License. - . - Exhibit A - . - Copyright (c) 1994-1999 Silicon Graphics, Inc. - . - The contents of this file are subject to the CID Font Code Public License - Version 1.0 (the "License"). You may not use this file except in compliance - with the License. You may obtain a copy of the License at Silicon Graphics, - Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 - or at http://www.sgi.com/software/opensource/cid/license.html - . - Software distributed under the License is distributed on an "AS IS" basis. ALL - WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - NON-INFRINGEMENT. See the License for the specific language governing rights - and limitations under the License. - . - The Original Software (as defined in the License) is CID font code that was - developed by Silicon Graphics, Inc. Those portions of the Subject Software (as - defined in the License) that were created by Silicon Graphics, Inc. are - Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - . - [NOTE: When using this text in connection with Subject Software delivered - solely in object code form, Recipient may replace the words "this file" with - "this software" in both the first and second sentences.] 3.6. Bitstream Vera - Fonts Copyright - . - The fonts have a generous copyright, allowing derivative works (as long as - "Bitstream" or "Vera" are not in the names), and full redistribution (so long - as they are not *sold* by themselves). They can be be bundled, redistributed - and sold with any software. - . - The fonts are distributed under the following copyright: - . - Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a - trademark of Bitstream, Inc. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of the fonts accompanying this license ("Fonts") and associated documentation - files (the "Font Software"), to reproduce and distribute the Font Software, - including without limitation the rights to use, copy, merge, publish, - distribute, and/or sell copies of the Font Software, and to permit persons to - whom the Font Software is furnished to do so, subject to the following - conditions: - . - The above copyright and trademark notices and this permission notice shall be - included in all copies of one or more of the Font Software typefaces. - . - The Font Software may be modified, altered, or added to, and in particular the - designs of glyphs or characters in the Fonts may be modified and additional - glyphs or characters may be added to the Fonts, only if the fonts are renamed - to names not containing either the words "Bitstream" or the word "Vera". - . - This License becomes null and void to the extent applicable to Fonts or Font - Software that has been modified and is distributed under the "Bitstream Vera" - names. - . - The Font Software may be sold as part of a larger software package but no copy - of one or more of the Font Software typefaces may be sold by itself. - . - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, - TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, - SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO - USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. - . - Except as contained in this notice, the names of Gnome, the Gnome Foundation, - and Bitstream Inc., shall not be used in advertising or otherwise to promote - the sale, use or other dealings in this Font Software without prior written - authorization from the Gnome Foundation or Bitstream Inc., respectively. For - further information, contact: fonts at gnome dot org. 3.7. Bigelow & Holmes - Inc and URW++ GmbH Luxi font license - . - Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction - code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a - registered trademark of Bigelow & Holmes Inc. - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of these Fonts and associated documentation files (the "Font Software"), to - deal in the Font Software, including without limitation the rights to use, - copy, merge, publish, distribute, sublicense, and/or sell copies of the Font - Software, and to permit persons to whom the Font Software is furnished to do - so, subject to the following conditions: - . - The above copyright and trademark notices and this permission notice shall be - included in all copies of one or more of the Font Software. - . - The Font Software may not be modified, altered, or added to, and in particular - the designs of glyphs or characters in the Fonts may not be modified nor may - additional glyphs or characters be added to the Fonts. This License becomes - null and void when the Fonts or Font Software have been modified. - . - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, - TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++ - GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY - GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN - AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR - INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT - SOFTWARE. - . - Except as contained in this notice, the names of Bigelow & Holmes Inc. and - URW++ GmbH. shall not be used in advertising or otherwise to promote the sale, - use or other dealings in this Font Software without prior written - authorization from Bigelow & Holmes Inc. and URW++ GmbH. + modification, are permitted provided that the following conditions are + met: . - For further information, contact: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . - info@urwpp.de or design@bigelowandholmes.com . . --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - %% This notice is provided with respect to zlib v1.2.5, which may be included - with JRE 8, JDK 8, and OpenJDK 8. + %% This notice is provided with respect to JRuby Joni v2.1.16, + which may be included with JRE 11, JDK 11 and OpenJDK 11 . --- begin of LICENSE --- . - version 1.2.5, July 18th, 2005 - . - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler - . - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. + MIT License . - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: . - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. + Copyright (c) 2017 JRuby Team . - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: . - --- end of LICENSE --- + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. . - ------------------------------------------------------------------------------ + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. . - %% This notice is provided with respect to the following which may be - included with JRE 8, JDK 8, and OpenJDK 8, except where noted: . - Apache Commons Math 2.2 - Apache Derby 10.10.1.2 [included with JDK 8] - Apache Jakarta BCEL 5.2 - Apache Jakarta Regexp 1.4 - Apache Santuario XML Security for Java 1.5.4 - Apache Xalan-Java 2.7.1 - Apache Xerces Java 2.10.0 - Apache XML Resolver 1.1 - Dynalink 0.5 . - These components are licensed under the Apache License, Version 2.0. - See /usr/share/common-licenses/Apache-2.0 + --- end of LICENSE --- . ------------------------------------------------------------------------------ - . - . - ============================================================================== Files: debian/* Copyright: Copyright © 2007-2023 Canonical Ltd. @@ -3417,3 +4055,4 @@ . On Debian systems a full copy of the GNU General Public License, GPL, can be found in the file /usr/share/common-licenses/GPL-2. + diff -Nru openjdk-lts-11.0.21+9/debian/copyright-generator/copyright-gen.py openjdk-lts-11.0.22+7/debian/copyright-generator/copyright-gen.py --- openjdk-lts-11.0.21+9/debian/copyright-generator/copyright-gen.py 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/copyright-generator/copyright-gen.py 2024-01-20 10:27:19.000000000 +0000 @@ -0,0 +1,291 @@ +#!/usr/bin/python3 + +# This script needs to be run from the `debian/copyright-generator` directory. + +# This is an initial version of a script that generates the copyrights file +# for the openjdk-XX packages. A lot of information is still hard-coded, +# which means the script needs to be improved. +# +# For instance, it must be possible to parse all the copyright headers from +# all the source files and deduce a list of "Upstream Authors". It must +# also be possible to deduce the smallest yet complete list of copyrights. +# For now, we have these hard-coded in the "copyright-gen/upstream-authors" +# and "copyright-gen/copyrights" file. +# +# Licenses from the legal directories of different modules are gathered and +# dumped under the License field of the first File stanza. +# The debian build does not build native libraries like zlib, pcsclite, giflib +# libpng and libjpeg. These are excluded. There's scope for improvement here too. +# The script must be able to look into "debian/rules" and deduce these exclusions. + +import os +import sys +import textwrap + +version = ""; +needs_cleanup = False +packaged_by = "Matthias Klose "; +common_licenses = {}; + +## TODO: Can the script deduce this list? +excluded_files = [ + ".github/*", + ".gitattributes", + "src/java.base/share/native/libzip/zlib/*", + "src/java.desktop/share/native/libsplashscreen/giflib/*", + "src/java.desktop/share/native/libsplashscreen/libpng/*", + "src/java.smartcardio/unix/native/libj2pcsc/MUSCLE/*", + "src/java.desktop/share/native/libjavajpeg/jc*", + "src/java.desktop/share/native/libjavajpeg/jd*", + "src/java.desktop/share/native/libjavajpeg/je*", + "src/java.desktop/share/native/libjavajpeg/jf*", + "src/java.desktop/share/native/libjavajpeg/ji*.c", + "src/java.desktop/share/native/libjavajpeg/jm*", + "src/java.desktop/share/native/libjavajpeg/jpegi*", + "src/java.desktop/share/native/libjavajpeg/jpeglib.h", + "src/java.desktop/share/native/libjavajpeg/jq*", + "src/java.desktop/share/native/libjavajpeg/jv*", + "src/java.desktop/share/native/libjavajpeg/ju*", + "src/java.desktop/share/native/libjavajpeg/README" +] + +## TODO: Can the script deduce this list? +openjdk_copyrights = [ + "Copyright (c) 1996-2023 Oracle and/or its affiliates.", + "Copyright (c) 1996-2003 Sun Microsystems, Inc.", + "Copyright (c) 2009-2012 Red Hat, Inc.", + "Copyright (c) 2012-2022 SAP SE.", + "Copyright (c) 2020-2021 Azul Systems, Inc.", + "Copyright (c) 1999-2022 The Apache Software Foundation.", + "Copyright (c) 2020-2021 Microsoft Corporation", + "Copyright (c) 2009-2022 Google LLC", + "Copyright (c) 2020-2021 Amazon.com, Inc", + "Copyright (c) 2021 Alibaba Group Holding Limited", + "Copyright (c) 2019-2021 Huawei Technologies Co. Ltd.", + "Copyright (c) 2021-2023 BELLSOFT", + "Copyright (c) 2022-23 THL A29 Limited, a Tencent company.", + "Copyright (c) 2021-2023, Arm Limited.", + "Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn.", + "Copyright (c) 2017 Instituto de Pesquisas Eldorado.", + "Copyright (c) 1999-2007 Brian Paul.", + "Copyright (c) 2018-2019 Adobe Inc.", + "Copyright 2006-2014 Adobe Systems Incorporated.", + "Copyright 1994-2011 Hewlett-Packard Co.", + "Portions Copyright (c) 2011-2014 IBM Corporation", + "Portions Copyright (c) 1995 Colin Plumb", + "Portions Copyright (c) 1997-2003 Eastman Kodak Company", + "See other third party notices under the License section" +] + +## TODO: Can the script deduce this list? +upstream_authors = [ + "Oracle and/or its affiliates", + "Sun Microsystems, Inc", + "Red Hat, Inc", + "SAP SE", + "Azul Systems, Inc", + "Apache Software Foundation", + "Microsoft Corporation", + "Intel Corportation", + "IBM Corporation", + "Google LLC", + "Amazon.com, Inc", + "Other contributors", + "See the third party licenses below." +] + +exclude_licenses = ["zlib.md", "pcsclite.md", "giflib.md", "libpng.md", "jpeg.md"] + +def print_field(name, single_line, value): + print(name + ":", end="") + if (single_line): + print(" " + value) + else: + print("\n" + value) + +def print_header_stanza(format, files_excluded, source, comment): + print_field("Format", True, format) + print_field("Files-Excluded", False, files_excluded) + print_field("Source", True, source) + print_field("Comment", False, comment) + print() # an empty line + +def print_file_stanza(files, copyrights, license, comments): + print_field("Files", True, files) + print_field("Copyright", False, copyrights) + print_field("License", True, license) + if (comments is not None and len(comments) != 0): + print_field("Comments", True, comments) + print() # an empty line + +def generate_excluded_files_str(): + return " " + "\n ".join(excluded_files) + +def generate_comment_str(): + upstream_authors_str = "\n ".join(upstream_authors) + return f""" Upstream Authors: + OpenJDK: + {upstream_authors_str} + Packaged by: + {packaged_by}""" + +def generate_header_stanza(): + format = "https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" + excluded = generate_excluded_files_str() + source = "https://github.com/openjdk/jdk11u" + comment = generate_comment_str() + print_header_stanza(format, excluded, source, comment) + +def get_content(path): + lines = [] + with open(path, 'r') as file: + for line in file: + lines.append(line + .replace("### ","") + .replace("```", "") + .replace("
", "")
+        .replace("
", "")) + + return lines[0], "".join(lines[1:]) + + +def fill_with_dots_and_indent(text): + indentation = " " * 2 + # Setting a large arbitrary width because we don't want to wrap lines + wrapper = textwrap.TextWrapper(initial_indent=indentation, width=2000, subsequent_indent=indentation, drop_whitespace=False) + lines = text.split("\n") + out = [] + for line in lines: + if line.strip() == "": + line = "." + out.append(wrapper.fill(line)) + return "\n".join(out) + +def gen_comment(component): + return f"""%% This notice is provided with respect to {component}, +which may be included with JRE {version}, JDK {version} and OpenJDK {version}""" + +def gen_license_text(license): + print("Gathering license content for " + license, file=sys.stderr) + component, content = get_content(license) + component = component.split("## ")[1].rstrip("\n"); + return f""" +{gen_comment(component)} + +--- begin of LICENSE --- +{content} +--- end of LICENSE --- + +------------------------------------------------------------------------------""" + + +def gather_legal_dirs(path): + legal_dirs = [] + for root, dirs, files in os.walk(path): + if "legal" in dirs and (root.endswith("share") or root.endswith("unix")): + legal_dirs.append(os.path.join(root, "legal")) + return legal_dirs + +def gather_licenses(module): + legal_dirs = gather_legal_dirs(module) + licenses_text = "" + for dir in sorted(legal_dirs): + licenses = os.listdir(dir) + for license in sorted(licenses): + if not license in exclude_licenses: + licenses_text += gen_license_text(dir + "/" + license) + return licenses_text + +def gather_modules_licenses(srcdir): + licenses = "" + modules = os.listdir(srcdir) + for module in sorted(modules): + licenses += gather_licenses(srcdir + "/" + module) + return licenses + +def find_directory(prefix, path = '.'): + for file in os.scandir(path): + if file.is_dir() and file.name.startswith(prefix): + return file.path + +def search_source_rootdir(level, path = '.'): + # The user might have already pulled the source package. + # Search for a downloaded package at three levels + # - openjdk + # - openjdk/debian + # - openjdk/debian/copyright-generator + # if one none found, download the source package + rootdir = find_directory(f"openjdk-{version}", path) + if rootdir is not None: + return rootdir + + match level: + case 0: + path = "./debian" + level= level + 1 + case 1: + path = "./debian/copyright-generator" + level = level + 1 + case 2: + print("No source package found. Downloading...", file = sys.stderr) + os.system(f"pull-debian-source openjdk-{version} > /dev/null 2>&1") + needs_cleanup = True + return find_directory(f"openjdk-{version}") + case _: + print("Irrecoverable error while searching for source package") + exit(1) + + return search_source_rootdir(level, path) + +def generate_copyright(): + rootdir = search_source_rootdir(0) + if rootdir is None: + print("No source package found. Download also failed. Aborting.") + exit(2) + print(f"Using the source package at {rootdir}", file = sys.stderr) + srcdir = f"{rootdir}/src"; + + os.system(f"/bin/sh ./debian/copyright-generator/strip-common-licenses.sh {rootdir} {version}") + generate_header_stanza(); + + licenses = f"""GPL with Classpath exception + +--- begin of LICENSE --- + +{open(rootdir + "/LICENSE").read()} +--- end of LICENSE --- + +------------------------------------------------------------------------------ +The following licenses for third party code are taken from 'legal' \ndirectories of modules under src/ +------------------------------------------------------------------------------ +{gather_modules_licenses(srcdir)}""" + + print_file_stanza("*", " " + "\n ".join(openjdk_copyrights), fill_with_dots_and_indent(licenses), "") + if (version != "11"): + print(open("./debian/copyright-generator/bundled-stanzas").read()) + print(open("./debian/copyright-generator/debian-stanzas").read()) + + # clean-up + if needs_cleanup: + os.system(f"rm -rf *.debian.tar.xz *.orig.tar.xz *.dsc *googletest.tar.xz"); + + +def main(): + global version + + sys.stdout = open('./debian/copyright', 'w') + supported_versions = ["11", "17", "21", "22", "23"] + if (len(sys.argv) >= 1): + version = sys.argv[1] + + if version == "" or version == "--help" or version == "-help" or version == "help": + print("Usage:\ndebian/copyright-generator/copyright-gen.py ", file=sys.stderr) + print("version - 11 | 17 | 21 | 22 | 23", file=sys.stderr) + + elif version in supported_versions: + generate_copyright() + else: + print("Version not supported.") + +if __name__ == "__main__": + main() diff -Nru openjdk-lts-11.0.21+9/debian/copyright-generator/debian-stanzas openjdk-lts-11.0.22+7/debian/copyright-generator/debian-stanzas --- openjdk-lts-11.0.21+9/debian/copyright-generator/debian-stanzas 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/copyright-generator/debian-stanzas 2024-01-20 10:27:19.000000000 +0000 @@ -0,0 +1,40 @@ +Files: debian/* +Copyright: Copyright © 2007-2023 Canonical Ltd. +License: MIT + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Files: debian/dbg.py +Copyright: Copyright 2016, Red Hat and individual contributors +License: LGPL + # Copyright 2016, Red Hat and individual contributors + # by the @authors tag. + # + # This is free software; you can redistribute it and/or modify it + # under the terms of the GNU Lesser General Public License as + # published by the Free Software Foundation; either version 2.1 of + # the License, or (at your option) any later version. + # + # This software is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # Lesser General Public License for more details. + . + On Debian systems a full copy of the GNU General Public License, GPL, can be + found in the file /usr/share/common-licenses/GPL-2. diff -Nru openjdk-lts-11.0.21+9/debian/copyright-generator/strip-common-licenses.sh openjdk-lts-11.0.22+7/debian/copyright-generator/strip-common-licenses.sh --- openjdk-lts-11.0.21+9/debian/copyright-generator/strip-common-licenses.sh 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/copyright-generator/strip-common-licenses.sh 2024-01-20 10:27:19.000000000 +0000 @@ -0,0 +1,19 @@ +SOURCE_DIR=$1 +VERSION=$2 +for LEGAL_DIR in `find $SOURCE_DIR/src -name legal`; do + for COMMON_LICENSE in "### Apache 2.0 License" "### GPL v2" ; do + for FILE in `grep -Rl "${COMMON_LICENSE}" $LEGAL_DIR`; do + sed -i "/^${COMMON_LICENSE}/,/^###/{/^###/!{d}}" $FILE + sed -i "s/${COMMON_LICENSE}/${COMMON_LICENSE}: Refer to the copy under \/usr\/share\/common-licenses\n/g" $FILE + done + done + # special cases + # JDK-21 + if [ $VERSION = "21" ] || [ $VERSION = "17" ] || [ $VERSION = "11" ]; then + FILE=$SOURCE_DIR/src/jdk.internal.le/share/legal/jline.md + sed -i "/^Apache License/,/^=====/{/^Apache License/!{/^=====/!{d}}}" $FILE + sed -i "s/^Apache License/Apache 2.0 License: Refer to the copy under \/usr\/share\/common-licenses\n\n/g" $FILE + fi +done + + diff -Nru openjdk-lts-11.0.21+9/debian/patches/atk-wrapper-security.diff openjdk-lts-11.0.22+7/debian/patches/atk-wrapper-security.diff --- openjdk-lts-11.0.21+9/debian/patches/atk-wrapper-security.diff 2023-10-19 02:24:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/patches/atk-wrapper-security.diff 2024-01-20 10:27:19.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/java.base/share/conf/security/java.security +++ b/src/java.base/share/conf/security/java.security -@@ -316,6 +316,7 @@ +@@ -319,6 +319,7 @@ keystore.type.compat=true # package.access=sun.misc.,\ sun.reflect.,\ diff -Nru openjdk-lts-11.0.21+9/debian/patches/multiple-pkcs11-library-init.diff openjdk-lts-11.0.22+7/debian/patches/multiple-pkcs11-library-init.diff --- openjdk-lts-11.0.21+9/debian/patches/multiple-pkcs11-library-init.diff 2023-10-19 02:24:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/patches/multiple-pkcs11-library-init.diff 2024-01-20 10:27:19.000000000 +0000 @@ -7,7 +7,7 @@ --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java -@@ -52,6 +52,7 @@ +@@ -52,6 +52,7 @@ final class Config { static final int ERR_HALT = 1; static final int ERR_IGNORE_ALL = 2; static final int ERR_IGNORE_LIB = 3; @@ -15,7 +15,7 @@ // same as allowSingleThreadedModules but controlled via a system property // and applied to all providers. if set to false, no SunPKCS11 instances -@@ -1030,6 +1031,8 @@ +@@ -1030,6 +1031,8 @@ final class Config { handleStartupErrors = ERR_IGNORE_LIB; } else if (val.equals("halt")) { handleStartupErrors = ERR_HALT; @@ -26,7 +26,7 @@ } --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java -@@ -176,26 +176,37 @@ +@@ -177,26 +177,37 @@ public final class SunPKCS11 extends Aut String nssLibraryDirectory = config.getNssLibraryDirectory(); String nssSecmodDirectory = config.getNssSecmodDirectory(); boolean nssOptimizeSpace = config.getNssOptimizeSpace(); diff -Nru openjdk-lts-11.0.21+9/debian/patches/reproducible-properties-timestamp.diff openjdk-lts-11.0.22+7/debian/patches/reproducible-properties-timestamp.diff --- openjdk-lts-11.0.21+9/debian/patches/reproducible-properties-timestamp.diff 2023-10-19 02:48:32.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/patches/reproducible-properties-timestamp.diff 2024-01-20 10:27:19.000000000 +0000 @@ -6,7 +6,7 @@ @@ -53,6 +53,9 @@ import sun.nio.cs.UTF_8; import sun.nio.cs.ISO_8859_1; - + +import java.security.AccessController; +import java.security.PrivilegedAction; + diff -Nru openjdk-lts-11.0.21+9/debian/patches/zero-x32.diff openjdk-lts-11.0.22+7/debian/patches/zero-x32.diff --- openjdk-lts-11.0.21+9/debian/patches/zero-x32.diff 2023-10-19 02:24:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/patches/zero-x32.diff 2024-01-20 10:27:19.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -1909,7 +1909,7 @@ +@@ -2019,7 +2019,7 @@ void * os::dll_load(const char *filename #if (defined IA32) static Elf32_Half running_arch_code=EM_386; @@ -11,7 +11,7 @@ static Elf32_Half running_arch_code=EM_IA_64; --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 -@@ -35,6 +35,10 @@ +@@ -35,6 +35,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU VAR_CPU_ARCH=x86 VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little @@ -22,7 +22,7 @@ ;; i?86) VAR_CPU=x86 -@@ -546,6 +550,8 @@ +@@ -546,6 +550,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HEL HOTSPOT_$1_CPU_DEFINE=IA32 elif test "x$OPENJDK_$1_CPU" = xx86_64; then HOTSPOT_$1_CPU_DEFINE=AMD64 diff -Nru openjdk-lts-11.0.21+9/debian/rules openjdk-lts-11.0.22+7/debian/rules --- openjdk-lts-11.0.21+9/debian/rules 2023-10-19 07:52:27.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/rules 2024-01-20 10:27:19.000000000 +0000 @@ -78,7 +78,6 @@ endif is_upstream_release = yes -#is_upstream_release = srcdir = . builddir = build @@ -158,7 +157,7 @@ with_check = $(if $(findstring nocheck, $(DEB_BUILD_OPTIONS)),,yes) # see Debian #920161 -ifneq (,$(filter $(DEB_HOST_ARCH), alpha)) +ifneq (,$(filter $(DEB_HOST_ARCH), alpha riscv64)) with_check = disabled running check on $(DEB_HOST_ARCH) endif # no jtreg backport yet @@ -869,7 +868,7 @@ control_vars += '-Vdbg:Conflicts=openjdk-12-dbg, openjdk-13-dbg, openjdk-14-dbg, openjdk-15-dbg, openjdk-16-dbg, openjdk-17-dbg' endif -debian/control: debian/control.in debian/tests/control debian/rules +debian/control: debian/control.in debian/tests/control debian/rules debian/watch @cp -p debian/control debian/control.old sed \ -e 's/@basename@/$(basename)/g' \ @@ -897,6 +896,7 @@ $(if $(altzero_archs), debian/control.zero-jre) \ $(if $(DEB_HOST_MULTIARCH),,| grep -v '^Multi-Arch') \ > debian/control + sed -i 's/[[:blank:]]*$$//' debian/control @if cmp -s debian/control debian/control.old; then \ rm -f debian/control.old; \ else \ @@ -925,7 +925,7 @@ packaging-files: for f in debian/*.in; do \ - case "$$f" in debian/control.in) continue; esac; \ + case "$$f" in debian/control.in|debian/watch.in) continue; esac; \ f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \ sed -e 's/@JRE@/$(p_jre)/g' \ -e 's/@JDK@/$(p_jdk)/g' \ @@ -1230,7 +1230,7 @@ dh_prep for f in debian/*.in; do \ f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \ - case "$$f2" in debian/control) continue; esac; \ + case "$$f2" in debian/control|debian/watch) continue; esac; \ rm -f $$f2; \ done rm -f debian/*.install debian/*.links debian/*.debhelper.log @@ -1882,18 +1882,28 @@ NO_PKG_MANGLE=1 \ dh_builddeb -a $(nodemo) $(nojrez) #$(bd_options) -is_release = yes -#is_release = + git_project = jdk11u -git_tag = jdk-11.0.21+9 +git_tag = jdk-11.0.22+7 package_version = $(subst jdk-,,$(git_tag)) package_version = $(shell echo $(PKGVERSION) | sed 's/-[^-][^-]*$$//') -ifneq ($(is_release),yes) +ifneq ($(is_upstream_release),yes) package_version := $(subst +,~,$(package_version)) endif git_url = https://github.com/openjdk/$(git_project) origdir = ../$(basename)-$(package_version).orig topdir = $(basename)-$(package_version) + +debian/watch: debian/watch.in debian/rules + sed \ + -e 's|@git_url@|$(git_url)/tags|g' \ + -e 's|@shortver@|$(shortver)|g' \ + debian/watch.in > debian/watch +# disable version mangling for the release version +ifeq ($(is_upstream_release),yes) + sed -i 's|repack.*\\|repack,\\|g' debian/watch +endif + get-orig: mkdir $(origdir) wget -O $(origdir)/jdk.tar.gz $(git_url)/archive/$(git_tag).tar.gz diff -Nru openjdk-lts-11.0.21+9/debian/watch openjdk-lts-11.0.22+7/debian/watch --- openjdk-lts-11.0.21+9/debian/watch 2023-10-19 02:24:28.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/watch 2024-01-20 10:27:19.000000000 +0000 @@ -1,7 +1,6 @@ version=4 opts=\ repack,\ -compression=xz,\ -dversionmangle=s/~\d*\~us\d*$/\+\d*/, \ - https://github.com/openjdk/jdk11u/tags \ - (?:.*?/)?jdk-(\d[\d.]*\+\d[\d]*)\.tar\.gz +compression=xz, \ + https://github.com/openjdk/jdk11u/tags \ + (?:.*?/)?jdk-(11[\+\.\d]*)\.tar\.gz diff -Nru openjdk-lts-11.0.21+9/debian/watch.in openjdk-lts-11.0.22+7/debian/watch.in --- openjdk-lts-11.0.21+9/debian/watch.in 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/debian/watch.in 2024-01-20 10:27:19.000000000 +0000 @@ -0,0 +1,6 @@ +version=4 +opts=\ +repack,repacksuffix=ea,oversionmangle=s/\+(\d+)/\~$1/,dversionmangle=s/\~(\d*)ea$/\+$1/,\ +compression=xz, \ + @git_url@ \ + (?:.*?/)?jdk-(@shortver@[\+\.\d]*)\.tar\.gz diff -Nru openjdk-lts-11.0.21+9/make/RunTestsPrebuilt.gmk openjdk-lts-11.0.22+7/make/RunTestsPrebuilt.gmk --- openjdk-lts-11.0.21+9/make/RunTestsPrebuilt.gmk 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/RunTestsPrebuilt.gmk 2024-01-09 21:19:49.000000000 +0000 @@ -157,6 +157,10 @@ OPENJDK_TARGET_OS := windows OPENJDK_TARGET_OS_TYPE := windows OPENJDK_TARGET_OS_ENV := windows.cygwin +else ifeq ($(UNAME_OS), MINGW64) + OPENJDK_TARGET_OS := windows + OPENJDK_TARGET_OS_TYPE := windows + OPENJDK_TARGET_OS_ENV := windows.msys2 else OPENJDK_TARGET_OS_TYPE:=unix ifeq ($(UNAME_OS), Linux) @@ -171,6 +175,9 @@ OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS) endif +# Sanity check env detection +$(info Detected target OS, type and env: [$(OPENJDK_TARGET_OS)] [$(OPENJDK_TARGET_OS_TYPE)] [$(OPENJDK_TARGET_OS_ENV)]) + # Assume little endian unless otherwise specified OPENJDK_TARGET_CPU_ENDIAN := little diff -Nru openjdk-lts-11.0.21+9/make/autoconf/platform.m4 openjdk-lts-11.0.22+7/make/autoconf/platform.m4 --- openjdk-lts-11.0.21+9/make/autoconf/platform.m4 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/autoconf/platform.m4 2024-01-09 21:19:49.000000000 +0000 @@ -566,6 +566,8 @@ HOTSPOT_$1_CPU_DEFINE=S390 elif test "x$OPENJDK_$1_CPU" = xriscv64; then HOTSPOT_$1_CPU_DEFINE=RISCV + elif test "x$OPENJDK_$1_CPU" = xloongarch64; then + HOTSPOT_$1_CPU_DEFINE=LOONGARCH64 elif test "x$OPENJDK_$1_CPU" != x; then HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z) fi diff -Nru openjdk-lts-11.0.21+9/make/autoconf/version-numbers openjdk-lts-11.0.22+7/make/autoconf/version-numbers --- openjdk-lts-11.0.21+9/make/autoconf/version-numbers 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/autoconf/version-numbers 2024-01-09 21:19:49.000000000 +0000 @@ -28,12 +28,12 @@ DEFAULT_VERSION_FEATURE=11 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=21 +DEFAULT_VERSION_UPDATE=22 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2023-10-17 +DEFAULT_VERSION_DATE=2024-01-16 DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" diff -Nru openjdk-lts-11.0.21+9/make/common/NativeCompilation.gmk openjdk-lts-11.0.22+7/make/common/NativeCompilation.gmk --- openjdk-lts-11.0.21+9/make/common/NativeCompilation.gmk 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/common/NativeCompilation.gmk 2024-01-09 21:19:49.000000000 +0000 @@ -359,10 +359,15 @@ endif endif + ifneq ($(DISABLE_WARNING_PREFIX), ) + $1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \ + $$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME))) + endif + $1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \ - $$($$($1_BASE)_SYSROOT_CFLAGS) + $$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS) $1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \ - $$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) + $$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS) $1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS) ifneq ($$(filter %.c, $$($1_FILENAME)), ) diff -Nru openjdk-lts-11.0.21+9/make/common/TestFilesCompilation.gmk openjdk-lts-11.0.22+7/make/common/TestFilesCompilation.gmk --- openjdk-lts-11.0.21+9/make/common/TestFilesCompilation.gmk 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/common/TestFilesCompilation.gmk 2024-01-09 21:19:49.000000000 +0000 @@ -62,7 +62,11 @@ $1_OUTPUT_SUBDIR := lib $1_BASE_CFLAGS := $(CFLAGS_JDKLIB) $1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB) - $1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) + ifeq ($(call isTargetOs, windows), false) + $1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) -pthread + else + $1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) + endif $1_COMPILATION_TYPE := LIBRARY else ifeq ($$($1_TYPE), PROGRAM) $1_PREFIX = exe diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/digicertcseccrootg5 openjdk-lts-11.0.22+7/make/data/cacerts/digicertcseccrootg5 --- openjdk-lts-11.0.21+9/make/data/cacerts/digicertcseccrootg5 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/digicertcseccrootg5 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,21 @@ +Owner: CN=DigiCert CS ECC P384 Root G5, O="DigiCert, Inc.", C=US +Issuer: CN=DigiCert CS ECC P384 Root G5, O="DigiCert, Inc.", C=US +Serial number: 3698fe712d519f3ced0fdb7b1643011 +Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046 +Signature algorithm name: SHA384withECDSA +Subject Public Key Algorithm: 384-bit EC (secp384r1) key +Version: 3 +-----BEGIN CERTIFICATE----- +MIICFjCCAZ2gAwIBAgIQA2mP5xLVGfPO0P23sWQwETAKBggqhkjOPQQDAzBNMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERp +Z2lDZXJ0IENTIEVDQyBQMzg0IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYw +MTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIElu +Yy4xJTAjBgNVBAMTHERpZ2lDZXJ0IENTIEVDQyBQMzg0IFJvb3QgRzUwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAR/FK2Ftpf9AiE1TWDoOJOTmz0FEG2v0/7v+rv7c5nz +7DISjcdouIveiaKIVHeNuyF+M5VWlgno1YyhBLibbhkAYuhCKKZYN4QZVSZ7Mzdn +8ppyraGurgBCPBx+uHqeIZyjQjBAMB0GA1UdDgQWBBTwjJhxOThlwjobphdmHcjt +Zd6SNjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQD +AwNnADBkAjAjb+EAGSZQ5EYgZYs3p8/rBuHMMskqoewyDXOiHgIcNWEqTmmrOXft +l4jAfWvqid0CMEPx0VijdT6Gm7ZVEYsX9z3+CmnFf07GdRtalMvqERHGCCKI3tB6 +oqV56OMhp80Tsw== +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/digicertcsrsarootg5 openjdk-lts-11.0.22+7/make/data/cacerts/digicertcsrsarootg5 --- openjdk-lts-11.0.21+9/make/data/cacerts/digicertcsrsarootg5 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/digicertcsrsarootg5 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,38 @@ +Owner: CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US +Issuer: CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US +Serial number: 6cee131be6d55c807f7c0c7fb44e620 +Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046 +Signature algorithm name: SHA384withRSA +Subject Public Key Algorithm: 4096-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIFZDCCA0ygAwIBAgIQBs7hMb5tVcgH98DH+0TmIDANBgkqhkiG9w0BAQwFADBM +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJDAiBgNVBAMT +G0RpZ2lDZXJ0IENTIFJTQTQwOTYgUm9vdCBHNTAeFw0yMTAxMTUwMDAwMDBaFw00 +NjAxMTQyMzU5NTlaMEwxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwg +SW5jLjEkMCIGA1UEAxMbRGlnaUNlcnQgQ1MgUlNBNDA5NiBSb290IEc1MIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtjNzgNhiA3AULBEcOV58rnyDhh3+ +Ji9MJK2L6oNfqbw9W/wLmEwCRzDs4v7s6DRbZl6/O9cspiX/jFmz3+rafCnZRlBy +CB1u0RsK3R/NmYn6Dw9zxOGcHXUyzW+X2ipqlbJsyQnQ6gt7fRcGSZnv1t7gyFPU +rsZ38Ya7Ixy4wN9Z94590e+C5iaLWji1/3XVstlPCfM3i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h1Rk86RMwaH4p2vq/uo6/HnbDo/cxvPJ1Gze6YOhjh0i7Mk6sgB73Dun +Qhp/3IupET2Op8Agb10JXUNE5o9mzKlbB/Hvm3oOs1ThlP0OLMaT11X9cZg1uAlK +/8YpKCz2Ui3bFBiSJ+IWfozK1GG+goeR65g3P79fXXc/NKwbOEOraHKZMh46Ghml +ozhMI9ej58zVKpIXkAtaS70WvfuGauKJmezkoFUYyaMIHxPgMghy0A== +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/digicerttlseccrootg5 openjdk-lts-11.0.22+7/make/data/cacerts/digicerttlseccrootg5 --- openjdk-lts-11.0.21+9/make/data/cacerts/digicerttlseccrootg5 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/digicerttlseccrootg5 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,21 @@ +Owner: CN=DigiCert TLS ECC P384 Root G5, O="DigiCert, Inc.", C=US +Issuer: CN=DigiCert TLS ECC P384 Root G5, O="DigiCert, Inc.", C=US +Serial number: 9e09365acf7d9c8b93e1c0b042a2ef3 +Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046 +Signature algorithm name: SHA384withECDSA +Subject Public Key Algorithm: 384-bit EC (secp384r1) key +Version: 3 +-----BEGIN CERTIFICATE----- +MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp +Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2 +MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ +bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS +7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp +0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS +B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ +LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4 +DXZDjC5Ty3zfDBeWUA== +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/digicerttlsrsarootg5 openjdk-lts-11.0.22+7/make/data/cacerts/digicerttlsrsarootg5 --- openjdk-lts-11.0.21+9/make/data/cacerts/digicerttlsrsarootg5 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/digicerttlsrsarootg5 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,38 @@ +Owner: CN=DigiCert TLS RSA4096 Root G5, O="DigiCert, Inc.", C=US +Issuer: CN=DigiCert TLS RSA4096 Root G5, O="DigiCert, Inc.", C=US +Serial number: 8f9b478a8fa7eda6a333789de7ccf8a +Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046 +Signature algorithm name: SHA384withRSA +Subject Public Key Algorithm: 4096-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBN +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMT +HERpZ2lDZXJ0IFRMUyBSU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0Y02cEhJhxw +GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7H +PNtQOa27PShNlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLF +O4uJ+DQtpBflF+aZfTCIITfNMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQ +REtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/u4cnYiWB39yhL/btp/96j1EuMPik +AdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9GOUrYU9DzLjtxpdRv +/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh47a+ +p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilw +MUc/dNAUFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WF +qUITVuwhd4GTWgzqltlJyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCK +ovfepEWFJqgejF0pW8hL2JpqA15w8oVPbEtoL8pU9ozaMv7Da4M/OMZ+ +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/emsigneccrootcag3 openjdk-lts-11.0.22+7/make/data/cacerts/emsigneccrootcag3 --- openjdk-lts-11.0.21+9/make/data/cacerts/emsigneccrootcag3 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/emsigneccrootcag3 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,22 @@ +Owner: CN=emSign ECC Root CA - G3, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Issuer: CN=emSign ECC Root CA - G3, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Serial number: 3cf607a968700eda8b84 +Valid from: Sun Feb 18 18:30:00 GMT 2018 until: Wed Feb 18 18:30:00 GMT 2043 +Signature algorithm name: SHA384withECDSA +Subject Public Key Algorithm: 384-bit EC (secp384r1) key +Version: 3 +-----BEGIN CERTIFICATE----- +MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQG +EwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNo +bm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g +RzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4MTgzMDAwWjBrMQswCQYDVQQGEwJJ +TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s +b2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0 +WXTsuwYc58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xyS +fvalY8L1X44uT6EYGQIrMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuB +zhccLikenEhjQjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggq +hkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+DCBeQyh+KTOgNG3qxrdWB +CUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7jHvrZQnD ++JbNR6iC8hZVdyR+EhCVBCyj +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/emsignrootcag1 openjdk-lts-11.0.22+7/make/data/cacerts/emsignrootcag1 --- openjdk-lts-11.0.21+9/make/data/cacerts/emsignrootcag1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/emsignrootcag1 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,29 @@ +Owner: CN=emSign Root CA - G1, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Issuer: CN=emSign Root CA - G1, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Serial number: 31f5e4620c6c58edd6d8 +Valid from: Sun Feb 18 18:30:00 GMT 2018 until: Wed Feb 18 18:30:00 GMT 2043 +Signature algorithm name: SHA256withRSA +Subject Public Key Algorithm: 2048-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYD +VQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBU +ZWNobm9sb2dpZXMgTGltaXRlZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBH +MTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgxODMwMDBaMGcxCzAJBgNVBAYTAklO +MRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVkaHJhIFRlY2hub2xv +Z2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQz +f2N4aLTNLnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO +8oG0x5ZOrRkVUkr+PHB1cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aq +d7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHWDV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhM +tTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ6DqS0hdW5TUaQBw+jSzt +Od9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrHhQIDAQAB +o0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQD +AgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31x +PaOfG1vR2vjTnGs2vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjM +wiI/aTvFthUvozXGaCocV685743QNcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6d +GNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q+Mri/Tm3R7nrft8EI6/6nAYH +6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeihU80Bv2noWgby +RQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx +iN66zB+Afko= +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/emsignrootcag2 openjdk-lts-11.0.22+7/make/data/cacerts/emsignrootcag2 --- openjdk-lts-11.0.21+9/make/data/cacerts/emsignrootcag2 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/emsignrootcag2 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,39 @@ +Owner: CN=emSign Root CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Issuer: CN=emSign Root CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN +Serial number: 864dbf0fe35ed77d8ed8 +Valid from: Sun Feb 18 18:30:00 GMT 2018 until: Wed Feb 18 18:30:00 GMT 2043 +Signature algorithm name: SHA384withRSA +Subject Public Key Algorithm: 4096-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIFlTCCA32gAwIBAgILAIZNvw/jXtd9jtgwDQYJKoZIhvcNAQEMBQAwZzELMAkG +A1UEBhMCSU4xEzARBgNVBAsTCmVtU2lnbiBQS0kxJTAjBgNVBAoTHG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Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B +AQwFAAOCAgEACFC/ilQg8KTCVBxFJW/sazomkS0kNYbEIZg4B3obqwsJ7SX98z8Z +gfzBpz0nYClwwJjWbFN1R2zY8pCEot6/dgmA8Vbq0GxhwPM5YN/SZquNyRIxO3cU +dlAcwf+vSezdVCf9wOzvSAF3q0a5ljvbdbNJNpfScQVp7UUd5sBsZk8jXO1KQ/go +/Vf/GDPnrIFmxpAIGE3sgnO8lAv9FzUaAeuv7HWe47xN9J7+bQzF93yHuIXACPTL +pQHhg2zMv5C7BAbuDHfbj1Cu294Z832yhSfBcziWGskOvl3es2EcHytbS9c9P+0z +Mpka7zGC1FHrvLb/FoduH86TeZt0QjZ6pcplNzoaxDnDvzTJ6CC2Eny+qH/APFCu +VUv5/wjwF+HPm8Pup2ARj9cEp92+0qcerfHacNq5hMeGZdbA/dzdUR/5z5zXdxAk +nl8mcfGb0eMNSTXQmmB/i4AecNnr72uYjzlaXUGYN7Nrb6XouG0pnh0/BBtWWp0U +ShIPpWEAqs7RJBj6+1ZUYXZ4ObrCw962DxhN2p19Hxw9LtuUUcLqqTPrFXYvwO4t +ouj7KJnAkaTUfXGdEaFVtFig1EA30WzJY2X1vAQ7hVnniCjgaXAGqjsU6sklNM9n +xDx5rFCCCEtj9Kh8UHjGK2QqgP5kwgttjOApQMaCoezMfK4KD7WpOXU= +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/letsencryptisrgx2 openjdk-lts-11.0.22+7/make/data/cacerts/letsencryptisrgx2 --- openjdk-lts-11.0.21+9/make/data/cacerts/letsencryptisrgx2 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/letsencryptisrgx2 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,21 @@ +Owner: CN=ISRG Root X2, O=Internet Security Research Group, C=US +Issuer: CN=ISRG Root X2, O=Internet Security Research Group, C=US +Serial number: 41d29dd172eaeea780c12c6ce92f8752 +Valid from: Fri Sep 04 00:00:00 GMT 2020 until: Mon Sep 17 16:00:00 GMT 2040 +Signature algorithm name: SHA384withECDSA +Subject Public Key Algorithm: 384-bit EC (secp384r1) key +Version: 3 +-----BEGIN CERTIFICATE----- +MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQsw +CQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2gg +R3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00 +MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVTMSkwJwYDVQQKEyBJbnRlcm5ldCBT +ZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNSRyBSb290IFgyMHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0HttwW ++1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9 +ItgKbppbd9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZI +zj0EAwMDaAAwZQIwe3lORlCEwkSHRhtFcP9Ymd70/aTSVaYgLXTWNLxBo1BfASdW +tL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5U6VR5CmD1/iQMVtCnwr1 +/q4AaOeMSQ+2b1tbFfLn +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/data/cacerts/teliarootcav2 openjdk-lts-11.0.22+7/make/data/cacerts/teliarootcav2 --- openjdk-lts-11.0.21+9/make/data/cacerts/teliarootcav2 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/data/cacerts/teliarootcav2 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,39 @@ +Owner: CN=Telia Root CA v2, O=Telia Finland Oyj, C=FI +Issuer: CN=Telia Root CA v2, O=Telia Finland Oyj, C=FI +Serial number: 1675f27d6fe7ae3e4acbe095b059e +Valid from: Thu Nov 29 11:55:54 GMT 2018 until: Sun Nov 29 11:55:54 GMT 2043 +Signature algorithm name: SHA256withRSA +Subject Public Key Algorithm: 4096-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQx +CzAJBgNVBAYTAkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UE +AwwQVGVsaWEgUm9vdCBDQSB2MjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1 +NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZ +MBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ76zBq +AMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9 +vVYiQJ3q9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9 +lRdU2HhE8Qx3FZLgmEKnpNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTOD +n3WhUidhOPFZPY5Q4L15POdslv5e2QJltI5c0BE0312/UqeBAMN/mUWZFdUXyApT +7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW5olWK8jjfN7j/4nlNW4o +6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNrRBH0p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+BsHMYeB2F326CjYSlKA +rBPuUBQemMc= +-----END CERTIFICATE----- diff -Nru openjdk-lts-11.0.21+9/make/lib/Awt2dLibraries.gmk openjdk-lts-11.0.22+7/make/lib/Awt2dLibraries.gmk --- openjdk-lts-11.0.21+9/make/lib/Awt2dLibraries.gmk 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/lib/Awt2dLibraries.gmk 2024-01-09 21:19:49.000000000 +0000 @@ -516,6 +516,7 @@ LIBFREETYPE_LIBS := -lfreetype endif + # gcc_ftobjs.c := maybe-uninitialized required for GCC 7 builds. $(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \ NAME := freetype, \ OPTIMIZATION := HIGHEST, \ @@ -528,6 +529,7 @@ DISABLED_WARNINGS_microsoft := 4018 4267 4244 4312 4819, \ DISABLED_WARNINGS_gcc := implicit-fallthrough cast-function-type bad-function-cast, \ DISABLED_WARNINGS_clang := missing-declarations, \ + DISABLED_WARNINGS_gcc_ftobjs.c := maybe-uninitialized, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ )) diff -Nru openjdk-lts-11.0.21+9/make/test/JtregNativeJdk.gmk openjdk-lts-11.0.22+7/make/test/JtregNativeJdk.gmk --- openjdk-lts-11.0.21+9/make/test/JtregNativeJdk.gmk 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/make/test/JtregNativeJdk.gmk 2024-01-09 21:19:49.000000000 +0000 @@ -56,7 +56,7 @@ # Platform specific setup ifeq ($(call isTargetOs, windows), true) - BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c + BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c exelauncher.c WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA) @@ -66,8 +66,10 @@ BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava ifeq ($(call isTargetOs, linux), true) + BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -ldl BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava else ifeq ($(call isTargetOs, solaris), true) + BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -lthread -ldl BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava endif UNIX_LDFLAGS_JLI := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli @@ -76,6 +78,7 @@ endif ifeq ($(call isTargetOs, macosx), true) + BUILD_JDK_JTREG_EXCLUDE += exelauncher.c BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestMainKeyWindow := \ -framework Cocoa BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestDynamicStore := \ diff -Nru openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/frame_ppc.inline.hpp openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/frame_ppc.inline.hpp --- openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/frame_ppc.inline.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/frame_ppc.inline.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -143,7 +143,6 @@ return (intptr_t*) &(get_ijava_state()->mdx); } -// Pointer beyond the "oldest/deepest" BasicObjectLock on stack. inline BasicObjectLock* frame::interpreter_frame_monitor_end() const { return (BasicObjectLock*) get_ijava_state()->monitors; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp --- openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1978,7 +1978,7 @@ } } -// Add a InterpMonitorElem to stack (see frame_sparc.hpp). +// Add a monitor (see frame_ppc.hpp). void InterpreterMacroAssembler::add_monitor_to_stack(bool stack_is_empty, Register Rtemp1, Register Rtemp2) { // Very-local scratch registers. diff -Nru openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp --- openjdk-lts-11.0.21+9/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -4056,90 +4056,78 @@ // at next monitor exit. void TemplateTable::monitorenter() { transition(atos, vtos); - __ verify_oop(R17_tos); - Register Rcurrent_monitor = R11_scratch1, - Rcurrent_obj = R12_scratch2, + Register Rcurrent_monitor = R3_ARG1, + Rcurrent_obj = R4_ARG2, Robj_to_lock = R17_tos, - Rscratch1 = R3_ARG1, - Rscratch2 = R4_ARG2, - Rscratch3 = R5_ARG3, - Rcurrent_obj_addr = R6_ARG4; + Rscratch1 = R11_scratch1, + Rscratch2 = R12_scratch2, + Rbot = R5_ARG3, + Rfree_slot = R6_ARG4; + + Label Lfound, Lallocate_new; + + __ ld(Rscratch1, _abi(callers_sp), R1_SP); // load FP + __ li(Rfree_slot, 0); // Points to free slot or null. + + // Set up search loop - start with topmost monitor. + __ mr(Rcurrent_monitor, R26_monitor); + __ addi(Rbot, Rscratch1, -frame::ijava_state_size); // ------------------------------------------------------------------------------ // Null pointer exception. - __ null_check_throw(Robj_to_lock, -1, R11_scratch1); + __ null_check_throw(Robj_to_lock, -1, Rscratch1); - // Try to acquire a lock on the object. - // Repeat until succeeded (i.e., until monitorenter returns true). + // Check if any slot is present => short cut to allocation if not. + __ cmpld(CCR0, Rcurrent_monitor, Rbot); + __ beq(CCR0, Lallocate_new); // ------------------------------------------------------------------------------ // Find a free slot in the monitor block. - Label Lfound, Lexit, Lallocate_new; - ConditionRegister found_free_slot = CCR0, - found_same_obj = CCR1, - reached_limit = CCR6; + // Note: The order of the monitors is important for C2 OSR which derives the + // unlock order from it (see comments for interpreter_frame_monitor_*). { - Label Lloop, Lentry; - Register Rlimit = Rcurrent_monitor; + Label Lloop, LnotFree, Lexit; - // Set up search loop - start with topmost monitor. - __ add(Rcurrent_obj_addr, BasicObjectLock::obj_offset_in_bytes(), R26_monitor); - - __ ld(Rlimit, 0, R1_SP); - __ addi(Rlimit, Rlimit, - (frame::ijava_state_size + frame::interpreter_frame_monitor_size_in_bytes() - BasicObjectLock::obj_offset_in_bytes())); // Monitor base - - // Check if any slot is present => short cut to allocation if not. - __ cmpld(reached_limit, Rcurrent_obj_addr, Rlimit); - __ bgt(reached_limit, Lallocate_new); - - // Pre-load topmost slot. - __ ld(Rcurrent_obj, 0, Rcurrent_obj_addr); - __ addi(Rcurrent_obj_addr, Rcurrent_obj_addr, frame::interpreter_frame_monitor_size() * wordSize); - // The search loop. __ bind(Lloop); - // Found free slot? - __ cmpdi(found_free_slot, Rcurrent_obj, 0); - // Is this entry for same obj? If so, stop the search and take the found - // free slot or allocate a new one to enable recursive locking. - __ cmpd(found_same_obj, Rcurrent_obj, Robj_to_lock); - __ cmpld(reached_limit, Rcurrent_obj_addr, Rlimit); - __ beq(found_free_slot, Lexit); - __ beq(found_same_obj, Lallocate_new); - __ bgt(reached_limit, Lallocate_new); - // Check if last allocated BasicLockObj reached. - __ ld(Rcurrent_obj, 0, Rcurrent_obj_addr); - __ addi(Rcurrent_obj_addr, Rcurrent_obj_addr, frame::interpreter_frame_monitor_size() * wordSize); - // Next iteration if unchecked BasicObjectLocks exist on the stack. - __ b(Lloop); + __ ld(Rcurrent_obj, BasicObjectLock::obj_offset_in_bytes(), Rcurrent_monitor); + // Exit if current entry is for same object; this guarantees, that new monitor + // used for recursive lock is above the older one. + __ cmpd(CCR0, Rcurrent_obj, Robj_to_lock); + __ beq(CCR0, Lexit); // recursive locking + + __ cmpdi(CCR0, Rcurrent_obj, 0); + __ bne(CCR0, LnotFree); + __ mr(Rfree_slot, Rcurrent_monitor); // remember free slot closest to the bottom + __ bind(LnotFree); + + __ addi(Rcurrent_monitor, Rcurrent_monitor, frame::interpreter_frame_monitor_size_in_bytes()); + __ cmpld(CCR0, Rcurrent_monitor, Rbot); + __ bne(CCR0, Lloop); + __ bind(Lexit); } // ------------------------------------------------------------------------------ // Check if we found a free slot. - __ bind(Lexit); - - __ addi(Rcurrent_monitor, Rcurrent_obj_addr, -(frame::interpreter_frame_monitor_size() * wordSize) - BasicObjectLock::obj_offset_in_bytes()); - __ addi(Rcurrent_obj_addr, Rcurrent_obj_addr, - frame::interpreter_frame_monitor_size() * wordSize); - __ b(Lfound); + __ cmpdi(CCR0, Rfree_slot, 0); + __ bne(CCR0, Lfound); // We didn't find a free BasicObjLock => allocate one. - __ align(32, 12); __ bind(Lallocate_new); __ add_monitor_to_stack(false, Rscratch1, Rscratch2); - __ mr(Rcurrent_monitor, R26_monitor); - __ addi(Rcurrent_obj_addr, R26_monitor, BasicObjectLock::obj_offset_in_bytes()); + __ mr(Rfree_slot, R26_monitor); // ------------------------------------------------------------------------------ // We now have a slot to lock. __ bind(Lfound); // Increment bcp to point to the next bytecode, so exception handling for async. exceptions work correctly. - // The object has already been poped from the stack, so the expression stack looks correct. + // The object has already been popped from the stack, so the expression stack looks correct. __ addi(R14_bcp, R14_bcp, 1); - __ std(Robj_to_lock, 0, Rcurrent_obj_addr); - __ lock_object(Rcurrent_monitor, Robj_to_lock); + __ std(Robj_to_lock, BasicObjectLock::obj_offset_in_bytes(), Rfree_slot); + __ lock_object(Rfree_slot, Robj_to_lock); // Check if there's enough space on the stack for the monitors after locking. // This emits a single store. @@ -4153,46 +4141,40 @@ transition(atos, vtos); __ verify_oop(R17_tos); - Register Rcurrent_monitor = R11_scratch1, - Rcurrent_obj = R12_scratch2, + Register Rcurrent_monitor = R3_ARG1, + Rcurrent_obj = R4_ARG2, Robj_to_lock = R17_tos, - Rcurrent_obj_addr = R3_ARG1, - Rlimit = R4_ARG2; + Rscratch = R11_scratch1, + Rbot = R12_scratch2; + Label Lfound, Lillegal_monitor_state; - // Check corner case: unbalanced monitorEnter / Exit. - __ ld(Rlimit, 0, R1_SP); - __ addi(Rlimit, Rlimit, - (frame::ijava_state_size + frame::interpreter_frame_monitor_size_in_bytes())); // Monitor base + __ ld(Rscratch, _abi(callers_sp), R1_SP); // load FP + + // Set up search loop - start with topmost monitor. + __ mr(Rcurrent_monitor, R26_monitor); + __ addi(Rbot, Rscratch, -frame::ijava_state_size); // Null pointer check. - __ null_check_throw(Robj_to_lock, -1, R11_scratch1); + __ null_check_throw(Robj_to_lock, -1, Rscratch); - __ cmpld(CCR0, R26_monitor, Rlimit); - __ bgt(CCR0, Lillegal_monitor_state); + // Check corner case: unbalanced monitorEnter / Exit. + __ cmpld(CCR0, Rcurrent_monitor, Rbot); + __ beq(CCR0, Lillegal_monitor_state); // Find the corresponding slot in the monitors stack section. { Label Lloop; - // Start with topmost monitor. - __ addi(Rcurrent_obj_addr, R26_monitor, BasicObjectLock::obj_offset_in_bytes()); - __ addi(Rlimit, Rlimit, BasicObjectLock::obj_offset_in_bytes()); - __ ld(Rcurrent_obj, 0, Rcurrent_obj_addr); - __ addi(Rcurrent_obj_addr, Rcurrent_obj_addr, frame::interpreter_frame_monitor_size() * wordSize); - __ bind(Lloop); + __ ld(Rcurrent_obj, BasicObjectLock::obj_offset_in_bytes(), Rcurrent_monitor); // Is this entry for same obj? __ cmpd(CCR0, Rcurrent_obj, Robj_to_lock); __ beq(CCR0, Lfound); - // Check if last allocated BasicLockObj reached. - - __ ld(Rcurrent_obj, 0, Rcurrent_obj_addr); - __ cmpld(CCR0, Rcurrent_obj_addr, Rlimit); - __ addi(Rcurrent_obj_addr, Rcurrent_obj_addr, frame::interpreter_frame_monitor_size() * wordSize); - - // Next iteration if unchecked BasicObjectLocks exist on the stack. - __ ble(CCR0, Lloop); + __ addi(Rcurrent_monitor, Rcurrent_monitor, frame::interpreter_frame_monitor_size_in_bytes()); + __ cmpld(CCR0, Rcurrent_monitor, Rbot); + __ bne(CCR0, Lloop); } // Fell through without finding the basic obj lock => throw up! @@ -4202,8 +4184,6 @@ __ align(32, 12); __ bind(Lfound); - __ addi(Rcurrent_monitor, Rcurrent_obj_addr, - -(frame::interpreter_frame_monitor_size() * wordSize) - BasicObjectLock::obj_offset_in_bytes()); __ unlock_object(Rcurrent_monitor); } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/cpu/x86/vm_version_x86.cpp openjdk-lts-11.0.22+7/src/hotspot/cpu/x86/vm_version_x86.cpp --- openjdk-lts-11.0.21+9/src/hotspot/cpu/x86/vm_version_x86.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/cpu/x86/vm_version_x86.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -745,7 +745,7 @@ } } - char buf[512]; + char buf[1024]; jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x" "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", diff -Nru openjdk-lts-11.0.21+9/src/hotspot/os/aix/os_aix.cpp openjdk-lts-11.0.22+7/src/hotspot/os/aix/os_aix.cpp --- openjdk-lts-11.0.21+9/src/hotspot/os/aix/os_aix.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/os/aix/os_aix.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -988,8 +988,10 @@ // and save the caller's signal mask os::Aix::hotspot_sigmask(thread); - log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").", - os::current_thread_id(), (uintx) kernel_thread_id); + log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT + ", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).", + os::current_thread_id(), (uintx) kernel_thread_id, + p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K); return true; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/os/bsd/os_bsd.cpp openjdk-lts-11.0.22+7/src/hotspot/os/bsd/os_bsd.cpp --- openjdk-lts-11.0.21+9/src/hotspot/os/bsd/os_bsd.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/os/bsd/os_bsd.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -863,9 +863,10 @@ // and save the caller's signal mask os::Bsd::hotspot_sigmask(thread); - log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").", - os::current_thread_id(), (uintx) pthread_self()); - + log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT + ", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).", + os::current_thread_id(), (uintx) pthread_self(), + p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K); return true; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/os/linux/os_linux.cpp openjdk-lts-11.0.22+7/src/hotspot/os/linux/os_linux.cpp --- openjdk-lts-11.0.21+9/src/hotspot/os/linux/os_linux.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/os/linux/os_linux.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1114,7 +1114,7 @@ os::Linux::hotspot_sigmask(thread); log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT - ", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "k) ).", + ", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).", os::current_thread_id(), (uintx) pthread_self(), p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K); @@ -2051,11 +2051,11 @@ static Elf32_Half running_arch_code=EM_SH; #elif (defined RISCV) static Elf32_Half running_arch_code=EM_RISCV; -#elif (defined LOONGARCH) +#elif (defined LOONGARCH64) static Elf32_Half running_arch_code=EM_LOONGARCH; #else #error Method os::dll_load requires that one of following is defined:\ - AARCH64, ALPHA, ARM, AMD64, IA32, IA64, LOONGARCH, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, RISCV, S390, SH, __sparc + AARCH64, ALPHA, ARM, AMD64, IA32, IA64, LOONGARCH64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, RISCV, S390, SH, __sparc #endif // Identify compatability class for VM's architecture and library's architecture diff -Nru openjdk-lts-11.0.21+9/src/hotspot/os/windows/os_windows.cpp openjdk-lts-11.0.22+7/src/hotspot/os/windows/os_windows.cpp --- openjdk-lts-11.0.21+9/src/hotspot/os/windows/os_windows.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/os/windows/os_windows.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -544,8 +544,10 @@ thread->set_osthread(osthread); - log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ").", - os::current_thread_id()); + log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", stack: " + PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).", + os::current_thread_id(), p2i(thread->stack_base()), + p2i(thread->stack_end()), thread->stack_size() / K); return true; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/c1/c1_LIRGenerator.cpp openjdk-lts-11.0.22+7/src/hotspot/share/c1/c1_LIRGenerator.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/c1/c1_LIRGenerator.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/c1/c1_LIRGenerator.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -81,6 +81,7 @@ PhiResolver::PhiResolver(LIRGenerator* gen, int max_vregs) : _gen(gen) , _state(gen->resolver_state()) + , _loop(NULL) , _temp(LIR_OprFact::illegalOpr) { // reinitialize the shared state arrays diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/c1/c1_RangeCheckElimination.cpp openjdk-lts-11.0.22+7/src/hotspot/share/c1/c1_RangeCheckElimination.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/c1/c1_RangeCheckElimination.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/c1/c1_RangeCheckElimination.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -384,8 +384,11 @@ aii->_max = idx; aii->_list = new AccessIndexedList(); } else if (idx >= aii->_min && idx <= aii->_max) { - remove_range_check(ai); - return; + // Guard against underflow/overflow (see 'range_cond' check in RangeCheckEliminator::in_block_motion) + if (aii->_max < 0 || (aii->_max + min_jint) <= aii->_min) { + remove_range_check(ai); + return; + } } aii->_min = MIN2(aii->_min, idx); aii->_max = MAX2(aii->_max, idx); @@ -428,9 +431,9 @@ } } } else { - int last_integer = 0; + jint last_integer = 0; Instruction *last_instruction = index; - int base = 0; + jint base = 0; ArithmeticOp *ao = index->as_ArithmeticOp(); while (ao != NULL && (ao->x()->as_Constant() || ao->y()->as_Constant()) && (ao->op() == Bytecodes::_iadd || ao->op() == Bytecodes::_isub)) { @@ -442,12 +445,12 @@ } if (c) { - int value = c->type()->as_IntConstant()->value(); + jint value = c->type()->as_IntConstant()->value(); if (value != min_jint) { if (ao->op() == Bytecodes::_isub) { value = -value; } - base += value; + base = java_add(base, value); last_integer = base; last_instruction = other; } @@ -469,12 +472,12 @@ assert(info != NULL, "Info must not be null"); // if idx < 0, max > 0, max + idx may fall between 0 and - // length-1 and if min < 0, min + idx may overflow and be >= + // length-1 and if min < 0, min + idx may underflow/overflow and be >= // 0. The predicate wouldn't trigger but some accesses could // be with a negative index. This test guarantees that for the // min and max value that are kept the predicate can't let // some incorrect accesses happen. - bool range_cond = (info->_max < 0 || info->_max + min_jint <= info->_min); + bool range_cond = (info->_max < 0 || (info->_max + min_jint) <= info->_min); // Generate code only if more than 2 range checks can be eliminated because of that. // 2 because at least 2 comparisons are done @@ -814,7 +817,7 @@ ); remove_range_check(ai); - } else if (_optimistic && loop_header) { + } else if (false && _optimistic && loop_header) { assert(ai->array(), "Array must not be null!"); assert(ai->index(), "Index must not be null!"); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/ci/ciEnv.cpp openjdk-lts-11.0.22+7/src/hotspot/share/ci/ciEnv.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/ci/ciEnv.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/ci/ciEnv.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1265,6 +1265,7 @@ tty->print_cr("# Compiler replay data is saved as: %s", buffer); } else { tty->print_cr("# Can't open file to dump replay data."); + close(fd); } } } @@ -1288,6 +1289,7 @@ tty->print_cr("%s", buffer); } else { tty->print_cr("# Can't open file to dump inline data."); + close(fd); } } } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/classfile/javaClasses.cpp openjdk-lts-11.0.22+7/src/hotspot/share/classfile/javaClasses.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/classfile/javaClasses.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/classfile/javaClasses.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -730,8 +730,13 @@ st->print("\""); for (int index = 0; index < length; index++) { - st->print("%c", (!is_latin1) ? value->char_at(index) : - ((jchar) value->byte_at(index)) & 0xff ); + jchar c = (!is_latin1) ? value->char_at(index) : + ((jchar) value->byte_at(index)) & 0xff; + if (c < ' ') { + st->print("\\x%02X", c); // print control characters e.g. \x0A + } else { + st->print("%c", c); + } } st->print("\""); } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/classfile/verifier.cpp openjdk-lts-11.0.22+7/src/hotspot/share/classfile/verifier.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/classfile/verifier.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/classfile/verifier.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -2182,11 +2182,12 @@ "low must be less than or equal to high in tableswitch"); return; } - keys = high - low + 1; - if (keys < 0) { + int64_t keys64 = ((int64_t)high - low) + 1; + if (keys64 > 65535) { // Max code length verify_error(ErrorContext::bad_code(bci), "too many keys in tableswitch"); return; } + keys = (int)keys64; delta = 1; } else { keys = (int)Bytes::get_Java_u4(aligned_bcp + jintSize); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/classfile/vmSymbols.cpp openjdk-lts-11.0.22+7/src/hotspot/share/classfile/vmSymbols.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/classfile/vmSymbols.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/classfile/vmSymbols.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -716,6 +716,7 @@ case vmIntrinsics::_compareAndExchangeObject: case vmIntrinsics::_compareAndExchangeObjectAcquire: case vmIntrinsics::_compareAndExchangeObjectRelease: + case vmIntrinsics::_allocateInstance: if (!InlineUnsafeOps) return true; break; case vmIntrinsics::_getShortUnaligned: @@ -726,7 +727,6 @@ case vmIntrinsics::_putCharUnaligned: case vmIntrinsics::_putIntUnaligned: case vmIntrinsics::_putLongUnaligned: - case vmIntrinsics::_allocateInstance: if (!InlineUnsafeOps || !UseUnalignedAccesses) return true; break; case vmIntrinsics::_hashCode: diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/code/codeBlob.cpp openjdk-lts-11.0.22+7/src/hotspot/share/code/codeBlob.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/code/codeBlob.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/code/codeBlob.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -185,7 +185,8 @@ jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2); if (PrintStubCode) { ttyLocker ttyl; - tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, (intptr_t) stub); + tty->print_cr("Decoding %s " PTR_FORMAT " [" PTR_FORMAT ", " PTR_FORMAT "] (%d bytes)", + stub_id, p2i(stub), p2i(stub->code_begin()), p2i(stub->code_end()), stub->code_size()); Disassembler::decode(stub->code_begin(), stub->code_end()); tty->cr(); } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/code/vtableStubs.cpp openjdk-lts-11.0.22+7/src/hotspot/share/code/vtableStubs.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/code/vtableStubs.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/code/vtableStubs.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -223,8 +223,9 @@ enter(is_vtable_stub, vtable_index, s); if (PrintAdapterHandlers) { - tty->print_cr("Decoding VtableStub %s[%d]@" INTX_FORMAT, - is_vtable_stub? "vtbl": "itbl", vtable_index, p2i(VtableStub::receiver_location())); + tty->print_cr("Decoding VtableStub %s[%d]@" PTR_FORMAT " [" PTR_FORMAT ", " PTR_FORMAT "] (" SIZE_FORMAT " bytes)", + is_vtable_stub? "vtbl": "itbl", vtable_index, p2i(VtableStub::receiver_location()), + p2i(s->code_begin()), p2i(s->code_end()), pointer_delta(s->code_end(), s->code_begin(), 1)); Disassembler::decode(s->code_begin(), s->code_end()); } // Notify JVMTI about this stub. The event will be recorded by the enclosing diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/compiler/compilerOracle.cpp openjdk-lts-11.0.22+7/src/hotspot/share/compiler/compilerOracle.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/compiler/compilerOracle.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/compiler/compilerOracle.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -827,21 +827,10 @@ } } - if (*line == method_sep) { - if (className == NULL) { - className = ""; - c_match = MethodMatcher::Any; - } - } else { - // got foo or foo/bar - if (className == NULL) { - ShouldNotReachHere(); - } else { - // missing class name handled as "Any" class match - if (className[0] == '\0') { - c_match = MethodMatcher::Any; - } - } + if (className == NULL || className[0] == '\0') { + // missing class name handled as "Any" class match + className = ""; + c_match = MethodMatcher::Any; } // each directive is terminated by , or NUL or . followed by NUL diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/gc/g1/heapRegionManager.cpp openjdk-lts-11.0.22+7/src/hotspot/share/gc/g1/heapRegionManager.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/gc/g1/heapRegionManager.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/gc/g1/heapRegionManager.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -286,7 +286,7 @@ uint curr = max_length() - 1; while (true) { HeapRegion *hr = _regions.get_by_index(curr); - if (hr == NULL) { + if (hr == NULL || !is_available(curr)) { uint res = expand_at(curr, 1, NULL); if (res == 1) { *expanded = true; diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gcTimer.cpp openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gcTimer.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gcTimer.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gcTimer.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "gc/shared/gcTimer.hpp" +#include "gc/shared/gc_globals.hpp" #include "utilities/growableArray.hpp" // the "time" parameter for most functions @@ -129,7 +130,7 @@ } void TimePartitions::report_gc_phase_start(const char* name, const Ticks& time, GCPhase::PhaseType type) { - assert(_phases->length() <= 1000, "Too many recored phases?"); + assert(UseZGC || _phases->length() <= 1000, "Too many recorded phases? (count: %d)", _phases->length()); int level = _active_phases.count(); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gcTraceSend.cpp openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gcTraceSend.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gcTraceSend.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gcTraceSend.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -161,9 +161,9 @@ static JfrStructCopyFailed to_struct(const CopyFailedInfo& cf_info) { JfrStructCopyFailed failed_info; failed_info.set_objectCount(cf_info.failed_count()); - failed_info.set_firstSize(cf_info.first_size()); - failed_info.set_smallestSize(cf_info.smallest_size()); - failed_info.set_totalSize(cf_info.total_size()); + failed_info.set_firstSize(cf_info.first_size() * HeapWordSize); + failed_info.set_smallestSize(cf_info.smallest_size() * HeapWordSize); + failed_info.set_totalSize(cf_info.total_size() * HeapWordSize); return failed_info; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gc_globals.hpp openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gc_globals.hpp --- openjdk-lts-11.0.21+9/src/hotspot/share/gc/shared/gc_globals.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/gc/shared/gc_globals.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -772,10 +772,13 @@ "Allocation averaging weight") \ range(0, 100) \ \ + /* At GC all TLABs are retired, and each thread's active */ \ + /* TLAB is assumed to be half full on average. The */ \ + /* remaining space is waste, proportional to TLAB size. */ \ + product(uintx, TLABWasteTargetPercent, 1, \ + "Percentage of Eden that can be wasted (half-full TLABs at GC)") \ /* Limit the lower bound of this flag to 1 as it is used */ \ /* in a division expression. */ \ - product(uintx, TLABWasteTargetPercent, 1, \ - "Percentage of Eden that can be wasted") \ range(1, 100) \ \ product(uintx, TLABRefillWasteFraction, 64, \ diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/interpreter/bytecodes.cpp openjdk-lts-11.0.22+7/src/hotspot/share/interpreter/bytecodes.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/interpreter/bytecodes.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/interpreter/bytecodes.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -99,12 +99,18 @@ if (end != NULL && aligned_bcp + 3*jintSize >= end) { return -1; // don't read past end of code buffer } + // Promote calculation to signed 64 bits to do range checks, used by the verifier. jlong lo = (jint)Bytes::get_Java_u4(aligned_bcp + 1*jintSize); jlong hi = (jint)Bytes::get_Java_u4(aligned_bcp + 2*jintSize); jlong len = (aligned_bcp - bcp) + (3 + hi - lo + 1)*jintSize; - // only return len if it can be represented as a positive int; - // return -1 otherwise - return (len > 0 && len == (int)len) ? len : -1; + // Only return len if it can be represented as a positive int and lo <= hi. + // The caller checks for bytecode stream overflow. + if (lo <= hi && len == (int)len) { + assert(len > 0, "must be"); + return (int)len; + } else { + return -1; + } } case _lookupswitch: // fall through @@ -116,9 +122,13 @@ } jlong npairs = (jint)Bytes::get_Java_u4(aligned_bcp + jintSize); jlong len = (aligned_bcp - bcp) + (2 + 2*npairs)*jintSize; - // only return len if it can be represented as a positive int; - // return -1 otherwise - return (len > 0 && len == (int)len) ? len : -1; + // Only return len if it can be represented as a positive int and npairs >= 0. + if (npairs >= 0 && len == (int)len) { + assert(len > 0, "must be"); + return (int)len; + } else { + return -1; + } } default: // Note: Length functions must return <=0 for invalid bytecodes. diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/interpreter/rewriter.cpp openjdk-lts-11.0.22+7/src/hotspot/share/interpreter/rewriter.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/interpreter/rewriter.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/interpreter/rewriter.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -400,7 +400,9 @@ } } - assert(bc_length != 0, "impossible bytecode length"); + // Continuing with an invalid bytecode will fail in the loop below. + // So guarantee here. + guarantee(bc_length > 0, "Verifier should have caught this invalid bytecode"); switch (c) { case Bytecodes::_lookupswitch : { diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp openjdk-lts-11.0.22+7/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -556,7 +556,8 @@ _thread_buffer_size("thread_buffer_size", "Size of a thread buffer", "MEMORY SIZE", false, "8k"), _memory_size("memorysize", "Overall memory size, ", "MEMORY SIZE", false, "10m"), _max_chunk_size("maxchunksize", "Size of an individual disk chunk", "MEMORY SIZE", false, "12m"), - _sample_threads("samplethreads", "Activate Thread sampling", "BOOLEAN", false, "true") { + _sample_threads("samplethreads", "Activate Thread sampling", "BOOLEAN", false, "true"), + _verbose(true) { _dcmdparser.add_dcmd_option(&_repository_path); _dcmdparser.add_dcmd_option(&_dump_path); _dcmdparser.add_dcmd_option(&_stack_depth); @@ -643,7 +644,7 @@ static const char klass[] = "jdk/jfr/internal/dcmd/DCmdConfigure"; static const char method[] = "execute"; - static const char signature[] = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;" + static const char signature[] = "(ZLjava/lang/String;Ljava/lang/String;Ljava/lang/Integer;" "Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;" "Ljava/lang/Long;Ljava/lang/Boolean;)Ljava/lang/String;"; @@ -651,6 +652,7 @@ execute_args.set_receiver(h_dcmd_instance); // params + execute_args.push_int(_verbose ? 1 : 0); execute_args.push_jobject(repository_path); execute_args.push_jobject(dump_path); execute_args.push_jobject(stack_depth); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp openjdk-lts-11.0.22+7/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -150,9 +150,13 @@ DCmdArgument _memory_size; DCmdArgument _max_chunk_size; DCmdArgument _sample_threads; + bool _verbose; public: JfrConfigureFlightRecorderDCmd(outputStream* output, bool heap); + void set_verbose(bool verbose) { + _verbose = verbose; + } static const char* name() { return "JFR.configure"; } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/metadata/metadata.xml openjdk-lts-11.0.22+7/src/hotspot/share/jfr/metadata/metadata.xml --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/metadata/metadata.xml 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/metadata/metadata.xml 2024-01-09 21:19:49.000000000 +0000 @@ -325,7 +325,7 @@ - + diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp openjdk-lts-11.0.22+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -36,7 +36,7 @@ // read static field HandleMark hm(thread); static const char klass[] = "jdk/jfr/internal/JVM"; - static const char field[] = "FILE_DELTA_CHANGE"; + static const char field[] = "CHUNK_ROTATION_MONITOR"; static const char signature[] = "Ljava/lang/Object;"; JavaValue result(T_OBJECT); JfrJavaArguments field_args(&result, klass, field, signature, thread); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp openjdk-lts-11.0.22+7/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -366,6 +366,7 @@ configure._sample_threads.set_is_set(_dcmd_sample_threads.is_set()); configure._sample_threads.set_value(_dcmd_sample_threads.value()); + configure.set_verbose(false); configure.execute(DCmd_Source_Internal, THREAD); if (HAS_PENDING_EXCEPTION) { diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/jfr/support/jfrIntrinsics.hpp openjdk-lts-11.0.22+7/src/hotspot/share/jfr/support/jfrIntrinsics.hpp --- openjdk-lts-11.0.21+9/src/hotspot/share/jfr/support/jfrIntrinsics.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/jfr/support/jfrIntrinsics.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -34,7 +34,8 @@ #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp" #define JFR_TEMPLATES(template) \ - template(jdk_jfr_internal_JVM, "jdk/jfr/internal/JVM") + template(jdk_jfr_internal_JVM, "jdk/jfr/internal/JVM") \ + template(jfr_chunk_rotation_monitor, "jdk/jfr/internal/JVM$ChunkRotationMonitor") \ #define JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias) \ do_intrinsic(_counterTime, jdk_jfr_internal_JVM, counterTime_name, void_long_signature, F_SN) \ diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/opto/doCall.cpp openjdk-lts-11.0.22+7/src/hotspot/share/opto/doCall.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/opto/doCall.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/opto/doCall.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -916,6 +916,8 @@ if (PrintOpto && WizardMode) { tty->print_cr(" Catching every inline exception bci:%d -> handler_bci:%d", bci(), handler_bci); } + // If this is a backwards branch in the bytecodes, add safepoint + maybe_add_safepoint(handler_bci); merge_exception(handler_bci); // jump to handler return; // No more handling to be done here! } @@ -947,6 +949,8 @@ klass->print_name(); tty->cr(); } + // If this is a backwards branch in the bytecodes, add safepoint + maybe_add_safepoint(handler_bci); merge_exception(handler_bci); } set_control(not_subtype_ctrl); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/opto/ifnode.cpp openjdk-lts-11.0.22+7/src/hotspot/share/opto/ifnode.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/opto/ifnode.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/opto/ifnode.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1702,6 +1702,46 @@ // then we are guaranteed to fail, so just start interpreting there. // We 'expand' the top 3 range checks to include all post-dominating // checks. + // + // Example: + // a[i+x] // (1) 1 < x < 6 + // a[i+3] // (2) + // a[i+4] // (3) + // a[i+6] // max = max of all constants + // a[i+2] + // a[i+1] // min = min of all constants + // + // If x < 3: + // (1) a[i+x]: Leave unchanged + // (2) a[i+3]: Replace with a[i+max] = a[i+6]: i+x < i+3 <= i+6 -> (2) is covered + // (3) a[i+4]: Replace with a[i+min] = a[i+1]: i+1 < i+4 <= i+6 -> (3) and all following checks are covered + // Remove all other a[i+c] checks + // + // If x >= 3: + // (1) a[i+x]: Leave unchanged + // (2) a[i+3]: Replace with a[i+min] = a[i+1]: i+1 < i+3 <= i+x -> (2) is covered + // (3) a[i+4]: Replace with a[i+max] = a[i+6]: i+1 < i+4 <= i+6 -> (3) and all following checks are covered + // Remove all other a[i+c] checks + // + // We only need the top 2 range checks if x is the min or max of all constants. + // + // This, however, only works if the interval [i+min,i+max] is not larger than max_int (i.e. abs(max - min) < max_int): + // The theoretical max size of an array is max_int with: + // - Valid index space: [0,max_int-1] + // - Invalid index space: [max_int,-1] // max_int, min_int, min_int - 1 ..., -1 + // + // The size of the consecutive valid index space is smaller than the size of the consecutive invalid index space. + // If we choose min and max in such a way that: + // - abs(max - min) < max_int + // - i+max and i+min are inside the valid index space + // then all indices [i+min,i+max] must be in the valid index space. Otherwise, the invalid index space must be + // smaller than the valid index space which is never the case for any array size. + // + // Choosing a smaller array size only makes the valid index space smaller and the invalid index space larger and + // the argument above still holds. + // + // Note that the same optimization with the same maximal accepted interval size can also be found in C1. + const jlong maximum_number_of_min_max_interval_indices = (jlong)max_jint; // The top 3 range checks seen const int NRC =3; @@ -1736,13 +1776,18 @@ found_immediate_dominator = true; break; } - // Gather expanded bounds - off_lo = MIN2(off_lo,offset2); - off_hi = MAX2(off_hi,offset2); - // Record top NRC range checks - prev_checks[nb_checks%NRC].ctl = prev_dom; - prev_checks[nb_checks%NRC].off = offset2; - nb_checks++; + + // "x - y" -> must add one to the difference for number of elements in [x,y] + const jlong diff = (jlong)MIN2(offset2, off_lo) - (jlong)MAX2(offset2, off_hi); + if (ABS(diff) < maximum_number_of_min_max_interval_indices) { + // Gather expanded bounds + off_lo = MIN2(off_lo, offset2); + off_hi = MAX2(off_hi, offset2); + // Record top NRC range checks + prev_checks[nb_checks % NRC].ctl = prev_dom; + prev_checks[nb_checks % NRC].off = offset2; + nb_checks++; + } } } prev_dom = dom; diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/opto/loopnode.cpp openjdk-lts-11.0.22+7/src/hotspot/share/opto/loopnode.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/opto/loopnode.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/opto/loopnode.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -350,6 +350,25 @@ #endif } +static int check_stride_overflow(jlong final_correction, const TypeInt* limit_t) { + if (final_correction > 0) { + if (limit_t->_lo > (max_jint - final_correction)) { + return -1; + } + if (limit_t->_hi > (max_jint - final_correction)) { + return 1; + } + } else { + if (limit_t->_hi < (min_jint - final_correction)) { + return -1; + } + if (limit_t->_lo < (min_jint - final_correction)) { + return 1; + } + } + return 0; +} + //------------------------------is_counted_loop-------------------------------- bool PhaseIdealLoop::is_counted_loop(Node* x, IdealLoopTree*& loop) { PhaseGVN *gvn = &_igvn; @@ -585,52 +604,202 @@ assert(x->Opcode() == Op_Loop, "regular loops only"); C->print_method(PHASE_BEFORE_CLOOPS, 3); - Node *hook = new Node(6); - // =================================================== - // Generate loop limit check to avoid integer overflow - // in cases like next (cyclic loops): + // We can only convert this loop to a counted loop if we can guarantee that the iv phi will never overflow at runtime. + // This is an implicit assumption taken by some loop optimizations. We therefore must ensure this property at all cost. + // At this point, we've already excluded some trivial cases where an overflow could have been proven statically. + // But even though we cannot prove that an overflow will *not* happen, we still want to speculatively convert this loop + // to a counted loop. This can be achieved by adding additional iv phi overflow checks before the loop. If they fail, + // we trap and resume execution before the loop without having executed any iteration of the loop, yet. // - // for (i=0; i <= max_jint; i++) {} - // for (i=0; i < max_jint; i+=2) {} + // These additional iv phi overflow checks can be inserted as Loop Limit Check Predicates above the Loop Limit Check + // Parse Predicate which captures a JVM state just before the entry of the loop. If there is no such Parse Predicate, + // we cannot generate a Loop Limit Check Predicate and thus cannot speculatively convert the loop to a counted loop. // + // In the following, we only focus on int loops with stride > 0 to keep things simple. The argumentation and proof + // for stride < 0 is analogously. For long loops, we would replace max_int with max_long. // - // Limit check predicate depends on the loop test: // - // for(;i != limit; i++) --> limit <= (max_jint) - // for(;i < limit; i+=stride) --> limit <= (max_jint - stride + 1) - // for(;i <= limit; i+=stride) --> limit <= (max_jint - stride ) + // The loop to be converted does not always need to have the often used shape: // - - // Check if limit is excluded to do more precise int overflow check. - bool incl_limit = (bt == BoolTest::le || bt == BoolTest::ge); - int stride_m = stride_con - (incl_limit ? 0 : (stride_con > 0 ? 1 : -1)); - - // If compare points directly to the phi we need to adjust - // the compare so that it points to the incr. Limit have - // to be adjusted to keep trip count the same and the - // adjusted limit should be checked for int overflow. - if (phi_incr != NULL) { - stride_m += stride_con; - } - - if (limit->is_Con()) { - int limit_con = limit->get_int(); - if ((stride_con > 0 && limit_con > (max_jint - stride_m)) || - (stride_con < 0 && limit_con < (min_jint - stride_m))) { - // Bailout: it could be integer overflow. - return false; + // i = init + // i = init loop: + // do { ... + // // ... equivalent i+=stride + // i+=stride <==> if (i < limit) + // } while (i < limit); goto loop + // exit: + // ... + // + // where the loop exit check uses the post-incremented iv phi and a '<'-operator. + // + // We could also have '<='-operator (or '>='-operator for negative strides) or use the pre-incremented iv phi value + // in the loop exit check: + // + // i = init + // loop: + // ... + // if (i <= limit) + // i+=stride + // goto loop + // exit: + // ... + // + // Let's define the following terms: + // - iv_pre_i: The pre-incremented iv phi before the i-th iteration. + // - iv_post_i: The post-incremented iv phi after the i-th iteration. + // + // The iv_pre_i and iv_post_i have the following relation: + // iv_pre_i + stride = iv_post_i + // + // When converting a loop to a counted loop, we want to have a canonicalized loop exit check of the form: + // iv_post_i < adjusted_limit + // + // If that is not the case, we need to canonicalize the loop exit check by using different values for adjusted_limit: + // (LE1) iv_post_i < limit: Already canonicalized. We can directly use limit as adjusted_limit. + // -> adjusted_limit = limit. + // (LE2) iv_post_i <= limit: + // iv_post_i < limit + 1 + // -> adjusted limit = limit + 1 + // (LE3) iv_pre_i < limit: + // iv_pre_i + stride < limit + stride + // iv_post_i < limit + stride + // -> adjusted_limit = limit + stride + // (LE4) iv_pre_i <= limit: + // iv_pre_i < limit + 1 + // iv_pre_i + stride < limit + stride + 1 + // iv_post_i < limit + stride + 1 + // -> adjusted_limit = limit + stride + 1 + // + // Note that: + // (AL) limit <= adjusted_limit. + // + // The following loop invariant has to hold for counted loops with n iterations (i.e. loop exit check true after n-th + // loop iteration) and a canonicalized loop exit check to guarantee that no iv_post_i over- or underflows: + // (INV) For i = 1..n, min_int <= iv_post_i <= max_int + // + // To prove (INV), we require the following two conditions/assumptions: + // (i): adjusted_limit - 1 + stride <= max_int + // (ii): init < limit + // + // If we can prove (INV), we know that there can be no over- or underflow of any iv phi value. We prove (INV) by + // induction by assuming (i) and (ii). + // + // Proof by Induction + // ------------------ + // > Base case (i = 1): We show that (INV) holds after the first iteration: + // min_int <= iv_post_1 = init + stride <= max_int + // Proof: + // First, we note that (ii) implies + // (iii) init <= limit - 1 + // max_int >= adjusted_limit - 1 + stride [using (i)] + // >= limit - 1 + stride [using (AL)] + // >= init + stride [using (iii)] + // >= min_int [using stride > 0, no underflow] + // Thus, no overflow happens after the first iteration and (INV) holds for i = 1. + // + // Note that to prove the base case we need (i) and (ii). + // + // > Induction Hypothesis (i = j, j > 1): Assume that (INV) holds after the j-th iteration: + // min_int <= iv_post_j <= max_int + // > Step case (i = j + 1): We show that (INV) also holds after the j+1-th iteration: + // min_int <= iv_post_{j+1} = iv_post_j + stride <= max_int + // Proof: + // If iv_post_j >= adjusted_limit: + // We exit the loop after the j-th iteration, and we don't execute the j+1-th iteration anymore. Thus, there is + // also no iv_{j+1}. Since (INV) holds for iv_j, there is nothing left to prove. + // If iv_post_j < adjusted_limit: + // First, we note that: + // (iv) iv_post_j <= adjusted_limit - 1 + // max_int >= adjusted_limit - 1 + stride [using (i)] + // >= iv_post_j + stride [using (iv)] + // >= min_int [using stride > 0, no underflow] + // + // Note that to prove the step case we only need (i). + // + // Thus, by assuming (i) and (ii), we proved (INV). + // + // + // It is therefore enough to add the following two Loop Limit Check Predicates to check assumptions (i) and (ii): + // + // (1) Loop Limit Check Predicate for (i): + // Using (i): adjusted_limit - 1 + stride <= max_int + // + // This condition is now restated to use limit instead of adjusted_limit: + // + // To prevent an overflow of adjusted_limit -1 + stride itself, we rewrite this check to + // max_int - stride + 1 >= adjusted_limit + // We can merge the two constants into + // canonicalized_correction = stride - 1 + // which gives us + // max_int - canonicalized_correction >= adjusted_limit + // + // To directly use limit instead of adjusted_limit in the predicate condition, we split adjusted_limit into: + // adjusted_limit = limit + limit_correction + // Since stride > 0 and limit_correction <= stride + 1, we can restate this with no over- or underflow into: + // max_int - canonicalized_correction - limit_correction >= limit + // Since canonicalized_correction and limit_correction are both constants, we can replace them with a new constant: + // final_correction = canonicalized_correction + limit_correction + // which gives us: + // + // Final predicate condition: + // max_int - final_correction >= limit + // + // (2) Loop Limit Check Predicate for (ii): + // Using (ii): init < limit + // + // This Loop Limit Check Predicate is not required if we can prove at compile time that either: + // (2.1) type(init) < type(limit) + // In this case, we know: + // all possible values of init < all possible values of limit + // and we can skip the predicate. + // + // (2.2) init < limit is already checked before (i.e. found as a dominating check) + // In this case, we do not need to re-check the condition and can skip the predicate. + // This is often found for while- and for-loops which have the following shape: + // + // if (init < limit) { // Dominating test. Do not need the Loop Limit Check Predicate below. + // i = init; + // if (init >= limit) { trap(); } // Here we would insert the Loop Limit Check Predicate + // do { + // i += stride; + // } while (i < limit); + // } + // + // (2.3) init + stride <= max_int + // In this case, there is no overflow of the iv phi after the first loop iteration. + // In the proof of the base case above we showed that init + stride <= max_int by using assumption (ii): + // init < limit + // In the proof of the step case above, we did not need (ii) anymore. Therefore, if we already know at + // compile time that init + stride <= max_int then we have trivially proven the base case and that + // there is no overflow of the iv phi after the first iteration. In this case, we don't need to check (ii) + // again and can skip the predicate. + + + // Accounting for (LE3) and (LE4) where we use pre-incremented phis in the loop exit check. + const jlong limit_correction_for_pre_iv_exit_check = (phi_incr != NULL) ? stride_con : 0; + + // Accounting for (LE2) and (LE4) where we use <= or >= in the loop exit check. + const bool includes_limit = (bt == BoolTest::le || bt == BoolTest::ge); + const jlong limit_correction_for_le_ge_exit_check = (includes_limit ? (stride_con > 0 ? 1 : -1) : 0); + + const jlong limit_correction = limit_correction_for_pre_iv_exit_check + limit_correction_for_le_ge_exit_check; + const jlong canonicalized_correction = stride_con + (stride_con > 0 ? -1 : 1); + const jlong final_correction = canonicalized_correction + limit_correction; + + int sov = check_stride_overflow(final_correction, limit_t); + + // If sov==0, limit's type always satisfies the condition, for + // example, when it is an array length. + if (sov != 0) { + if (sov < 0) { + return false; // Bailout: integer overflow is certain. } - } else if ((stride_con > 0 && limit_t->_hi <= (max_jint - stride_m)) || - (stride_con < 0 && limit_t->_lo >= (min_jint - stride_m))) { - // Limit's type may satisfy the condition, for example, - // when it is an array length. - } else { - // Generate loop's limit check. - // Loop limit check predicate should be near the loop. + // (1) Loop Limit Check Predicate is required because we could not statically prove that + // limit + final_correction = adjusted_limit - 1 + stride <= max_int ProjNode *limit_check_proj = find_predicate_insertion_point(init_control, Deoptimization::Reason_loop_limit_check); if (!limit_check_proj) { - // The limit check predicate is not generated if this method trapped here before. + // The Loop Limit Check Parse Predicate is not generated if this method trapped here before. #ifdef ASSERT if (TraceLoopLimitCheck) { tty->print("missing loop limit check:"); @@ -651,68 +820,83 @@ Node* bol; if (stride_con > 0) { - cmp_limit = new CmpINode(limit, _igvn.intcon(max_jint - stride_m)); + cmp_limit = new CmpINode(limit, _igvn.intcon(max_jint - final_correction)); bol = new BoolNode(cmp_limit, BoolTest::le); } else { - cmp_limit = new CmpINode(limit, _igvn.intcon(min_jint - stride_m)); + cmp_limit = new CmpINode(limit, _igvn.intcon(min_jint - final_correction)); bol = new BoolNode(cmp_limit, BoolTest::ge); } insert_loop_limit_check(limit_check_proj, cmp_limit, bol); } - // Now we need to canonicalize loop condition. - if (bt == BoolTest::ne) { - assert(stride_con == 1 || stride_con == -1, "simple increment only"); - if (stride_con > 0 && init_t->_hi < limit_t->_lo) { - // 'ne' can be replaced with 'lt' only when init < limit. - bt = BoolTest::lt; - } else if (stride_con < 0 && init_t->_lo > limit_t->_hi) { - // 'ne' can be replaced with 'gt' only when init > limit. - bt = BoolTest::gt; - } else { - ProjNode *limit_check_proj = find_predicate_insertion_point(init_control, Deoptimization::Reason_loop_limit_check); - if (!limit_check_proj) { - // The limit check predicate is not generated if this method trapped here before. + // (2.3) + const bool init_plus_stride_could_overflow = + (stride_con > 0 && init_t->_hi > max_jint - stride_con) || + (stride_con < 0 && init_t->_lo < min_jint - stride_con); + // (2.1) + const bool init_gte_limit = (stride_con > 0 && init_t->_hi >= limit_t->_lo) || + (stride_con < 0 && init_t->_lo <= limit_t->_hi); + + if (init_gte_limit && // (2.1) + ((bt == BoolTest::ne || init_plus_stride_could_overflow) && // (2.3) + !has_dominating_loop_limit_check(init_trip, limit, stride_con, init_control))) { // (2.2) + // (2) Iteration Loop Limit Check Predicate is required because neither (2.1), (2.2), nor (2.3) holds. + // We use the following condition: + // - stride > 0: init < limit + // - stride < 0: init > limit + // + // This predicate is always required if we have a non-equal-operator in the loop exit check (where stride = 1 is + // a requirement). We transform the loop exit check by using a less-than-operator. By doing so, we must always + // check that init < limit. Otherwise, we could have a different number of iterations at runtime. + + ProjNode *limit_check_proj = find_predicate_insertion_point(init_control, Deoptimization::Reason_loop_limit_check); + if (!limit_check_proj) { + // The limit check predicate is not generated if this method trapped here before. #ifdef ASSERT - if (TraceLoopLimitCheck) { - tty->print("missing loop limit check:"); - loop->dump_head(); - x->dump(1); - } -#endif - return false; + if (TraceLoopLimitCheck) { + tty->print("missing loop limit check:"); + loop->dump_head(); + x->dump(1); } - IfNode* check_iff = limit_check_proj->in(0)->as_If(); +#endif + return false; + } + IfNode* check_iff = limit_check_proj->in(0)->as_If(); - if (!is_dominator(get_ctrl(limit), check_iff->in(0)) || - !is_dominator(get_ctrl(init_trip), check_iff->in(0))) { - return false; - } + if (!is_dominator(get_ctrl(limit), check_iff->in(0)) || + !is_dominator(get_ctrl(init_trip), check_iff->in(0))) { + return false; + } - Node* cmp_limit; - Node* bol; + Node* cmp_limit; + Node* bol; - if (stride_con > 0) { - cmp_limit = new CmpINode(init_trip, limit); - bol = new BoolNode(cmp_limit, BoolTest::lt); - } else { - cmp_limit = new CmpINode(init_trip, limit); - bol = new BoolNode(cmp_limit, BoolTest::gt); - } + if (stride_con > 0) { + cmp_limit = new CmpINode(init_trip, limit); + bol = new BoolNode(cmp_limit, BoolTest::lt); + } else { + cmp_limit = new CmpINode(init_trip, limit); + bol = new BoolNode(cmp_limit, BoolTest::gt); + } - insert_loop_limit_check(limit_check_proj, cmp_limit, bol); + insert_loop_limit_check(limit_check_proj, cmp_limit, bol); + } - if (stride_con > 0) { - // 'ne' can be replaced with 'lt' only when init < limit. - bt = BoolTest::lt; - } else if (stride_con < 0) { - // 'ne' can be replaced with 'gt' only when init > limit. - bt = BoolTest::gt; - } + if (bt == BoolTest::ne) { + // Now we need to canonicalize the loop condition if it is 'ne'. + assert(stride_con == 1 || stride_con == -1, "simple increment only - checked before"); + if (stride_con > 0) { + // 'ne' can be replaced with 'lt' only when init < limit. This is ensured by the inserted predicate above. + bt = BoolTest::lt; + } else { + assert(stride_con < 0, "must be"); + // 'ne' can be replaced with 'gt' only when init > limit. This is ensured by the inserted predicate above. + bt = BoolTest::gt; } } + Node* adjusted_limit = limit; if (phi_incr != NULL) { // If compare points directly to the phi we need to adjust // the compare so that it points to the incr. Limit have @@ -723,15 +907,15 @@ // is converted to // i = init; do {} while(++i < limit+1); // - limit = gvn->transform(new AddINode(limit, stride)); + adjusted_limit = gvn->transform(new AddINode(limit, stride)); } - if (incl_limit) { + if (includes_limit) { // The limit check guaranties that 'limit <= (max_jint - stride)' so // we can convert 'i <= limit' to 'i < limit+1' since stride != 0. // Node* one = (stride_con > 0) ? gvn->intcon( 1) : gvn->intcon(-1); - limit = gvn->transform(new AddINode(limit, one)); + adjusted_limit = gvn->transform(new AddINode(adjusted_limit, one)); if (bt == BoolTest::le) bt = BoolTest::lt; else if (bt == BoolTest::ge) @@ -739,7 +923,7 @@ else ShouldNotReachHere(); } - set_subtree_ctrl( limit ); + set_subtree_ctrl(adjusted_limit); if (LoopStripMiningIter == 0) { // Check for SafePoint on backedge and remove @@ -776,7 +960,7 @@ } cmp = cmp->clone(); cmp->set_req(1,incr); - cmp->set_req(2,limit); + cmp->set_req(2, adjusted_limit); cmp = _igvn.register_new_node_with_optimizer(cmp); set_ctrl(cmp, iff->in(0)); @@ -869,9 +1053,6 @@ } } - // Free up intermediate goo - _igvn.remove_dead_node(hook); - #ifdef ASSERT assert(l->is_valid_counted_loop(), "counted loop shape is messed up"); assert(l == loop->_head && l->phi() == phi && l->loopexit_or_null() == lex, "" ); @@ -900,6 +1081,37 @@ return true; } +// Check if there is a dominating loop limit check of the form 'init < limit' starting at the loop entry. +// If there is one, then we do not need to create an additional Loop Limit Check Predicate. +bool PhaseIdealLoop::has_dominating_loop_limit_check(Node* init_trip, Node* limit, const int stride_con, + Node* loop_entry) { + // Eagerly call transform() on the Cmp and Bool node to common them up if possible. This is required in order to + // successfully find a dominated test with the If node below. + Node* cmp_limit; + Node* bol; + if (stride_con > 0) { + cmp_limit = _igvn.transform(new CmpINode(init_trip, limit)); + bol = _igvn.transform(new BoolNode(cmp_limit, BoolTest::lt)); + } else { + cmp_limit = _igvn.transform(new CmpINode(init_trip, limit)); + bol = _igvn.transform(new BoolNode(cmp_limit, BoolTest::gt)); + } + + // Check if there is already a dominating init < limit check. If so, we do not need a Loop Limit Check Predicate. + IfNode* iff = new IfNode(loop_entry, bol, PROB_MIN, COUNT_UNKNOWN); + // Also add fake IfProj nodes in order to call transform() on the newly created IfNode. + IfFalseNode* if_false = new IfFalseNode(iff); + IfTrueNode* if_true = new IfTrueNode(iff); + Node* dominated_iff = _igvn.transform(iff); + // ConI node? Found dominating test (IfNode::dominated_by() returns a ConI node). + const bool found_dominating_test = dominated_iff != NULL && dominated_iff->Opcode() == Op_ConI; + + // Kill the If with its projections again in the next IGVN round by cutting it off from the graph. + _igvn.replace_input_of(iff, 0, C->top()); + _igvn.replace_input_of(iff, 1, C->top()); + return found_dominating_test; +} + //----------------------exact_limit------------------------------------------- Node* PhaseIdealLoop::exact_limit( IdealLoopTree *loop ) { assert(loop->_head->is_CountedLoop(), ""); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/opto/loopnode.hpp openjdk-lts-11.0.22+7/src/hotspot/share/opto/loopnode.hpp --- openjdk-lts-11.0.21+9/src/hotspot/share/opto/loopnode.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/opto/loopnode.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -1135,6 +1135,9 @@ // Create a new if above the uncommon_trap_if_pattern for the predicate to be promoted ProjNode* create_new_if_for_predicate(ProjNode* cont_proj, Node* new_entry, Deoptimization::DeoptReason reason, int opcode, bool if_cont_is_true_proj = true); + bool has_dominating_loop_limit_check(Node* init_trip, Node* limit, int stride_con, + Node* loop_entry); + void register_control(Node* n, IdealLoopTree *loop, Node* pred); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/runtime/objectMonitor.cpp openjdk-lts-11.0.22+7/src/hotspot/share/runtime/objectMonitor.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/runtime/objectMonitor.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/runtime/objectMonitor.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1393,6 +1393,12 @@ return v; } +static inline bool is_excluded(const Klass* monitor_klass) { + assert(monitor_klass != NULL, "invariant"); + NOT_JFR_RETURN_(false); + JFR_ONLY(return vmSymbols::jfr_chunk_rotation_monitor() == monitor_klass->name()); +} + static void post_monitor_wait_event(EventJavaMonitorWait* event, ObjectMonitor* monitor, jlong notifier_tid, @@ -1400,7 +1406,11 @@ bool timedout) { assert(event != NULL, "invariant"); assert(monitor != NULL, "invariant"); - event->set_monitorClass(((oop)monitor->object())->klass()); + const Klass* monitor_klass = ((oop)monitor->object())->klass(); + if (is_excluded(monitor_klass)) { + return; + } + event->set_monitorClass(monitor_klass); event->set_timeout(timeout); event->set_address((uintptr_t)monitor->object_addr()); event->set_notifier(notifier_tid); diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/services/diagnosticArgument.cpp openjdk-lts-11.0.22+7/src/hotspot/share/services/diagnosticArgument.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/services/diagnosticArgument.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/services/diagnosticArgument.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, 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 @@ -28,6 +28,7 @@ #include "memory/resourceArea.hpp" #include "runtime/thread.hpp" #include "services/diagnosticArgument.hpp" +#include "utilities/globalDefinitions.hpp" StringArrayArgument::StringArrayArgument() { _array = new(ResourceObj::C_HEAP, mtInternal)GrowableArray(32, true); @@ -116,13 +117,12 @@ || sscanf(str, JLONG_FORMAT "%n", &_value, &scanned) != 1 || (size_t)scanned != len) { - ResourceMark rm; - - char* buf = NEW_RESOURCE_ARRAY(char, len + 1); - strncpy(buf, str, len); - buf[len] = '\0'; + const int maxprint = 64; Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_IllegalArgumentException(), - "Integer parsing error in command argument '%s'. Could not parse: %s.\n", _name, buf); + "Integer parsing error in command argument '%s'. Could not parse: %.*s%s.\n", _name, + MIN2((int)len, maxprint), + (str == NULL ? "" : str), + (len > maxprint ? "..." : "")); } } diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/utilities/macros.hpp openjdk-lts-11.0.22+7/src/hotspot/share/utilities/macros.hpp --- openjdk-lts-11.0.21+9/src/hotspot/share/utilities/macros.hpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/utilities/macros.hpp 2024-01-09 21:19:49.000000000 +0000 @@ -279,8 +279,12 @@ #if INCLUDE_JFR #define JFR_ONLY(code) code +#define NOT_JFR_RETURN() /* next token must be ; */ +#define NOT_JFR_RETURN_(code) /* next token must be ; */ #else #define JFR_ONLY(code) +#define NOT_JFR_RETURN() {} +#define NOT_JFR_RETURN_(code) { return code; } #endif #ifndef INCLUDE_JVMCI diff -Nru openjdk-lts-11.0.21+9/src/hotspot/share/utilities/vmError.cpp openjdk-lts-11.0.22+7/src/hotspot/share/utilities/vmError.cpp --- openjdk-lts-11.0.21+9/src/hotspot/share/utilities/vmError.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/hotspot/share/utilities/vmError.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -83,6 +83,8 @@ "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", "JAVA_COMPILER", "PATH", "USERNAME", + "XDG_CACHE_HOME", "XDG_CONFIG_HOME", "FC_LANG", "FONTCONFIG_USE_MMAP", + // Env variables that are defined on Solaris/Linux/BSD "LD_LIBRARY_PATH", "LD_PRELOAD", "SHELL", "DISPLAY", "HOSTTYPE", "OSTYPE", "ARCH", "MACHTYPE", @@ -1568,6 +1570,7 @@ int e = errno; out.print_raw("#\n# Can't open file to dump replay data. Error: "); out.print_raw_cr(os::strerror(e)); + close(fd); } } } diff -Nru openjdk-lts-11.0.21+9/src/java.base/aix/native/libnet/aix_close.c openjdk-lts-11.0.22+7/src/java.base/aix/native/libnet/aix_close.c --- openjdk-lts-11.0.21+9/src/java.base/aix/native/libnet/aix_close.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/aix/native/libnet/aix_close.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2019, SAP SE and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -388,50 +388,50 @@ /************** Basic I/O operations here ***************/ /* - * Macro to perform a blocking IO operation. Restarts - * automatically if interrupted by signal (other than - * our wakeup signal) - */ -#define BLOCKING_IO_RETURN_INT(FD, FUNC) { \ - int ret; \ - threadEntry_t self; \ - fdEntry_t *fdEntry = getFdEntry(FD); \ - if (fdEntry == NULL) { \ - errno = EBADF; \ - return -1; \ - } \ - do { \ - startOp(fdEntry, &self); \ - ret = FUNC; \ - endOp(fdEntry, &self); \ - } while (ret == -1 && errno == EINTR); \ - return ret; \ + * Macro to perform a blocking IO operation. + * If interrupted by signal (other than our wakeup signal), and if RETRY is true, + * then restarts automatically + */ +#define BLOCKING_IO_RETURN_INT(FD, FUNC, RETRY) { \ + int ret; \ + threadEntry_t self; \ + fdEntry_t *fdEntry = getFdEntry(FD); \ + if (fdEntry == NULL) { \ + errno = EBADF; \ + return -1; \ + } \ + do { \ + startOp(fdEntry, &self); \ + ret = FUNC; \ + endOp(fdEntry, &self); \ + } while ((RETRY) && ret == -1 && errno == EINTR); \ + return ret; \ } int NET_Read(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0), JNI_TRUE ); } int NET_NonBlockingRead(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK)); + BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK), JNI_TRUE ); } int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen) { - BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen) ); + BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen), JNI_TRUE ); } int NET_Send(int s, void *msg, int len, unsigned int flags) { - BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags) ); + BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags), JNI_TRUE ); } int NET_SendTo(int s, const void *msg, int len, unsigned int flags, const struct sockaddr *to, int tolen) { - BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen) ); + BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen), JNI_TRUE ); } int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen) { - BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen) ); + BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen), JNI_TRUE); } int NET_Connect(int s, struct sockaddr *addr, int addrlen) { @@ -489,7 +489,7 @@ } int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { - BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout) ); + BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout), JNI_FALSE ); } /* @@ -531,12 +531,16 @@ * has expired return 0 (indicating timeout expired). */ if (rv < 0 && errno == EINTR) { - jlong newNanoTime = JVM_NanoTime(env, 0); - nanoTimeout -= newNanoTime - prevNanoTime; - if (nanoTimeout < NET_NSEC_PER_MSEC) { - return 0; + if (timeout > 0) { + jlong newNanoTime = JVM_NanoTime(env, 0); + nanoTimeout -= newNanoTime - prevNanoTime; + if (nanoTimeout < NET_NSEC_PER_MSEC) { + return 0; + } + prevNanoTime = newNanoTime; + } else { + continue; // timeout is -1, so loop again. } - prevNanoTime = newNanoTime; } else { return rv; } diff -Nru openjdk-lts-11.0.21+9/src/java.base/linux/native/libnet/linux_close.c openjdk-lts-11.0.22+7/src/java.base/linux/native/libnet/linux_close.c --- openjdk-lts-11.0.21+9/src/java.base/linux/native/libnet/linux_close.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/linux/native/libnet/linux_close.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -345,58 +345,58 @@ /************** Basic I/O operations here ***************/ /* - * Macro to perform a blocking IO operation. Restarts - * automatically if interrupted by signal (other than - * our wakeup signal) - */ -#define BLOCKING_IO_RETURN_INT(FD, FUNC) { \ - int ret; \ - threadEntry_t self; \ - fdEntry_t *fdEntry = getFdEntry(FD); \ - if (fdEntry == NULL) { \ - errno = EBADF; \ - return -1; \ - } \ - do { \ - startOp(fdEntry, &self); \ - ret = FUNC; \ - endOp(fdEntry, &self); \ - } while (ret == -1 && errno == EINTR); \ - return ret; \ + * Macro to perform a blocking IO operation. + * If interrupted by signal (other than our wakeup signal), and if RETRY is true, + * then restarts automatically + */ +#define BLOCKING_IO_RETURN_INT(FD, FUNC, RETRY) { \ + int ret; \ + threadEntry_t self; \ + fdEntry_t *fdEntry = getFdEntry(FD); \ + if (fdEntry == NULL) { \ + errno = EBADF; \ + return -1; \ + } \ + do { \ + startOp(fdEntry, &self); \ + ret = FUNC; \ + endOp(fdEntry, &self); \ + } while ((RETRY) && ret == -1 && errno == EINTR); \ + return ret; \ } int NET_Read(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0), JNI_TRUE ); } int NET_NonBlockingRead(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) ); + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT), JNI_TRUE ); } int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen) { - BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen) ); + BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen), JNI_TRUE ); } int NET_Send(int s, void *msg, int len, unsigned int flags) { - BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags) ); + BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags), JNI_TRUE ); } int NET_SendTo(int s, const void *msg, int len, unsigned int flags, const struct sockaddr *to, int tolen) { - BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen) ); + BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen), JNI_TRUE ); } int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen) { - BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen) ); + BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen), JNI_TRUE ); } int NET_Connect(int s, struct sockaddr *addr, int addrlen) { - BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen) ); + BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen), JNI_TRUE ); } int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { - BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout) ); + BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout), JNI_FALSE ); } /* @@ -437,12 +437,16 @@ * has expired return 0 (indicating timeout expired). */ if (rv < 0 && errno == EINTR) { - jlong newNanoTime = JVM_NanoTime(env, 0); - nanoTimeout -= newNanoTime - prevNanoTime; - if (nanoTimeout < NET_NSEC_PER_MSEC) { - return 0; + if (timeout > 0) { + jlong newNanoTime = JVM_NanoTime(env, 0); + nanoTimeout -= newNanoTime - prevNanoTime; + if (nanoTimeout < NET_NSEC_PER_MSEC) { + return 0; + } + prevNanoTime = newNanoTime; + } else { + continue; // timeout is -1, so loop again. } - prevNanoTime = newNanoTime; } else { return rv; } diff -Nru openjdk-lts-11.0.21+9/src/java.base/macosx/native/libnet/bsd_close.c openjdk-lts-11.0.22+7/src/java.base/macosx/native/libnet/bsd_close.c --- openjdk-lts-11.0.21+9/src/java.base/macosx/native/libnet/bsd_close.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/macosx/native/libnet/bsd_close.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -349,58 +349,58 @@ /************** Basic I/O operations here ***************/ /* - * Macro to perform a blocking IO operation. Restarts - * automatically if interrupted by signal (other than - * our wakeup signal) - */ -#define BLOCKING_IO_RETURN_INT(FD, FUNC) { \ - int ret; \ - threadEntry_t self; \ - fdEntry_t *fdEntry = getFdEntry(FD); \ - if (fdEntry == NULL) { \ - errno = EBADF; \ - return -1; \ - } \ - do { \ - startOp(fdEntry, &self); \ - ret = FUNC; \ - endOp(fdEntry, &self); \ - } while (ret == -1 && errno == EINTR); \ - return ret; \ + * Macro to perform a blocking IO operation. + * If interrupted by signal (other than our wakeup signal), and if RETRY is true, + * then restarts automatically + */ +#define BLOCKING_IO_RETURN_INT(FD, FUNC, RETRY) { \ + int ret; \ + threadEntry_t self; \ + fdEntry_t *fdEntry = getFdEntry(FD); \ + if (fdEntry == NULL) { \ + errno = EBADF; \ + return -1; \ + } \ + do { \ + startOp(fdEntry, &self); \ + ret = FUNC; \ + endOp(fdEntry, &self); \ + } while ((RETRY) && ret == -1 && errno == EINTR); \ + return ret; \ } int NET_Read(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0), JNI_TRUE ); } int NET_NonBlockingRead(int s, void* buf, size_t len) { - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT)); + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT), JNI_TRUE ); } int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen) { - BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen) ); + BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen), JNI_TRUE ); } int NET_Send(int s, void *msg, int len, unsigned int flags) { - BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags) ); + BLOCKING_IO_RETURN_INT( s, send(s, msg, len, flags), JNI_TRUE ); } int NET_SendTo(int s, const void *msg, int len, unsigned int flags, const struct sockaddr *to, int tolen) { - BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen) ); + BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen), JNI_TRUE ); } int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen) { - BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen) ); + BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen), JNI_TRUE ); } int NET_Connect(int s, struct sockaddr *addr, int addrlen) { - BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen) ); + BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen), JNI_TRUE ); } int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { - BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout) ); + BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout), JNI_FALSE ); } /* @@ -472,17 +472,20 @@ * has expired return 0 (indicating timeout expired). */ if (rv < 0 && errno == EINTR) { - jlong newNanoTime = JVM_NanoTime(env, 0); - nanoTimeout -= newNanoTime - prevNanoTime; - if (nanoTimeout < NET_NSEC_PER_MSEC) { - if (allocated != 0) - free(fdsp); - return 0; + if (timeout > 0) { + jlong newNanoTime = JVM_NanoTime(env, 0); + nanoTimeout -= newNanoTime - prevNanoTime; + if (nanoTimeout < NET_NSEC_PER_MSEC) { + if (allocated != 0) + free(fdsp); + return 0; + } + prevNanoTime = newNanoTime; + t.tv_sec = nanoTimeout / NET_NSEC_PER_SEC; + t.tv_usec = (nanoTimeout % NET_NSEC_PER_SEC) / NET_NSEC_PER_USEC; + } else { + continue; // timeout is -1, so loop again. } - prevNanoTime = newNanoTime; - t.tv_sec = nanoTimeout / NET_NSEC_PER_SEC; - t.tv_usec = (nanoTimeout % NET_NSEC_PER_SEC) / NET_NSEC_PER_USEC; - } else { if (allocated != 0) free(fdsp); diff -Nru openjdk-lts-11.0.21+9/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m openjdk-lts-11.0.22+7/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m --- openjdk-lts-11.0.21+9/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m 2024-01-09 21:19:49.000000000 +0000 @@ -363,7 +363,9 @@ // Call back to the Java object to create Java objects corresponding to this security object. jlong nativeKeyRef = ptr_to_jlong(privateKeyRef); (*env)->CallVoidMethod(env, keyStore, jm_createKeyEntry, alias, creationDate, nativeKeyRef, certRefArray, javaCertArray); - JNU_CHECK_EXCEPTION(env); + if ((*env)->ExceptionCheck(env)) { + goto errOut; + } } } while (searchResult == noErr); @@ -505,7 +507,9 @@ // Call back to the Java object to create Java objects corresponding to this security object. jlong nativeRef = ptr_to_jlong(certRef); (*env)->CallVoidMethod(env, keyStore, jm_createTrustedCertEntry, alias, inputTrust, nativeRef, creationDate, certData); - JNU_CHECK_EXCEPTION(env); + if ((*env)->ExceptionCheck(env)) { + goto errOut; + } } } while (searchResult == noErr); diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java openjdk-lts-11.0.22+7/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2023, 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 @@ -98,6 +98,7 @@ // cipher parameter for OAEP padding and TLS RSA premaster secret private AlgorithmParameterSpec spec = null; + private boolean forTlsPremasterSecret = false; // buffer for the data private byte[] buffer; @@ -291,6 +292,7 @@ } spec = params; + forTlsPremasterSecret = true; this.random = random; // for TLS RSA premaster secret } int blockType = (mode <= MODE_DECRYPT) ? RSAPadding.PAD_BLOCKTYPE_2 @@ -354,21 +356,38 @@ switch (mode) { case MODE_SIGN: paddingCopy = padding.pad(buffer, 0, bufOfs); - result = RSACore.rsa(paddingCopy, privateKey, true); + if (paddingCopy != null) { + result = RSACore.rsa(paddingCopy, privateKey, true); + } else { + throw new BadPaddingException("Padding error in signing"); + } break; case MODE_VERIFY: byte[] verifyBuffer = RSACore.convert(buffer, 0, bufOfs); paddingCopy = RSACore.rsa(verifyBuffer, publicKey); result = padding.unpad(paddingCopy); + if (result == null) { + throw new BadPaddingException + ("Padding error in verification"); + } break; case MODE_ENCRYPT: paddingCopy = padding.pad(buffer, 0, bufOfs); - result = RSACore.rsa(paddingCopy, publicKey); + if (paddingCopy != null) { + result = RSACore.rsa(paddingCopy, publicKey); + } else { + throw new BadPaddingException + ("Padding error in encryption"); + } break; case MODE_DECRYPT: byte[] decryptBuffer = RSACore.convert(buffer, 0, bufOfs); paddingCopy = RSACore.rsa(decryptBuffer, privateKey, false); result = padding.unpad(paddingCopy); + if (result == null && !forTlsPremasterSecret) { + throw new BadPaddingException + ("Padding error in decryption"); + } break; default: throw new AssertionError("Internal error"); @@ -377,9 +396,9 @@ } finally { Arrays.fill(buffer, 0, bufOfs, (byte)0); bufOfs = 0; - if (paddingCopy != null // will not happen + if (paddingCopy != null && paddingCopy != buffer // already cleaned - && paddingCopy != result) { // DO NOT CLEAN, THIS IS RESULT! + && paddingCopy != result) { // DO NOT CLEAN, THIS IS RESULT Arrays.fill(paddingCopy, (byte)0); } } @@ -454,26 +473,22 @@ boolean isTlsRsaPremasterSecret = algorithm.equals("TlsRsaPremasterSecret"); - Exception failover = null; byte[] encoded = null; update(wrappedKey, 0, wrappedKey.length); try { encoded = doFinal(); - } catch (BadPaddingException e) { - if (isTlsRsaPremasterSecret) { - failover = e; - } else { - throw new InvalidKeyException("Unwrapping failed", e); - } - } catch (IllegalBlockSizeException e) { - // should not occur, handled with length check above + } catch (BadPaddingException | IllegalBlockSizeException e) { + // BadPaddingException cannot happen for TLS RSA unwrap. + // In that case, padding error is indicated by returning null. + // IllegalBlockSizeException cannot happen in any case, + // because of the length check above. throw new InvalidKeyException("Unwrapping failed", e); } try { if (isTlsRsaPremasterSecret) { - if (!(spec instanceof TlsRsaPremasterSecretParameterSpec)) { + if (!forTlsPremasterSecret) { throw new IllegalStateException( "No TlsRsaPremasterSecretParameterSpec specified"); } @@ -482,7 +497,7 @@ encoded = KeyUtil.checkTlsPreMasterSecretKey( ((TlsRsaPremasterSecretParameterSpec) spec).getClientVersion(), ((TlsRsaPremasterSecretParameterSpec) spec).getServerVersion(), - random, encoded, (failover != null)); + random, encoded, encoded == null); } return ConstructKeys.constructKey(encoded, algorithm, type); diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/java/lang/System.java openjdk-lts-11.0.22+7/src/java.base/share/classes/java/lang/System.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/java/lang/System.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/java/lang/System.java 2024-01-09 21:19:49.000000000 +0000 @@ -60,6 +60,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Stream; +import jdk.internal.logger.LoggerFinderLoader.TemporaryLoggerFinder; import jdk.internal.util.StaticProperty; import jdk.internal.module.ModuleBootstrap; import jdk.internal.module.ServicesCatalog; @@ -1619,13 +1620,16 @@ // We do not need to synchronize: LoggerFinderLoader will // always return the same instance, so if we don't have it, // just fetch it again. - if (service == null) { + LoggerFinder finder = service; + if (finder == null) { PrivilegedAction pa = () -> LoggerFinderLoader.getLoggerFinder(); - service = AccessController.doPrivileged(pa, null, + finder = AccessController.doPrivileged(pa, null, LOGGERFINDER_PERMISSION); + if (finder instanceof TemporaryLoggerFinder) return finder; + service = finder; } - return service; + return finder; } } diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/java/security/Provider.java openjdk-lts-11.0.22+7/src/java.base/share/classes/java/security/Provider.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/java/security/Provider.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/java/security/Provider.java 2024-01-09 21:19:49.000000000 +0000 @@ -25,6 +25,8 @@ package java.security; +import jdk.internal.event.SecurityProviderServiceEvent; + import java.io.*; import java.util.*; import static java.util.Locale.ENGLISH; @@ -1278,19 +1280,28 @@ key = new ServiceKey(type, algorithm, false); previousKey = key; } + Service s = null; if (!serviceMap.isEmpty()) { - Service s = serviceMap.get(key); - if (s != null) { - return s; - } + s = serviceMap.get(key); } - synchronized (this) { - ensureLegacyParsed(); - if (legacyMap != null && !legacyMap.isEmpty()) { - return legacyMap.get(key); + if (s == null) { + synchronized (this) { + ensureLegacyParsed(); + if (legacyMap != null && !legacyMap.isEmpty()) { + s = legacyMap.get(key); + } } } - return null; + + if (s != null && SecurityProviderServiceEvent.isTurnedOn()) { + var e = new SecurityProviderServiceEvent(); + e.provider = getName(); + e.type = type; + e.algorithm = algorithm; + e.commit(); + } + + return s; } // ServiceKey from previous getService() call diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/java/util/Objects.java openjdk-lts-11.0.22+7/src/java.base/share/classes/java/util/Objects.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/java/util/Objects.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/java/util/Objects.java 2024-01-09 21:19:49.000000000 +0000 @@ -216,6 +216,7 @@ * @return {@code obj} if not {@code null} * @throws NullPointerException if {@code obj} is {@code null} */ + @ForceInline public static T requireNonNull(T obj) { if (obj == null) throw new NullPointerException(); @@ -241,6 +242,7 @@ * @return {@code obj} if not {@code null} * @throws NullPointerException if {@code obj} is {@code null} */ + @ForceInline public static T requireNonNull(T obj, String message) { if (obj == null) throw new NullPointerException(message); diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/java/util/jar/JarFile.java openjdk-lts-11.0.22+7/src/java.base/share/classes/java/util/jar/JarFile.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/java/util/jar/JarFile.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/java/util/jar/JarFile.java 2024-01-09 21:19:49.000000000 +0000 @@ -809,7 +809,9 @@ throw new IOException("Unsupported size: " + uncompressedSize + " for JarEntry " + ze.getName() + ". Allowed max size: " + - SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes"); + SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes. " + + "You can use the jdk.jar.maxSignatureFileSize " + + "system property to increase the default value."); } int len = (int)uncompressedSize; int bytesRead; diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.event; + +/** + * Event recording details of Provider.getService(String type, String algorithm) calls + */ + +public final class SecurityProviderServiceEvent extends Event { + private final static SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent(); + + /** + * Returns {@code true} if event is enabled, {@code false} otherwise. + */ + public static boolean isTurnedOn() { + return EVENT.isEnabled(); + } + + public String type; + public String algorithm; + public String provider; +} diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -38,7 +38,6 @@ import java.util.function.Supplier; import java.lang.System.LoggerFinder; import java.lang.System.Logger; -import java.lang.System.Logger.Level; import java.lang.ref.WeakReference; import java.util.Objects; import java.util.concurrent.ExecutionException; @@ -228,9 +227,19 @@ // The accessor in which this logger is temporarily set. final LazyLoggerAccessor holder; + // tests whether the logger is invoked by the loading thread before + // the LoggerFinder is loaded; can be null; + final BooleanSupplier isLoadingThread; - BootstrapLogger(LazyLoggerAccessor holder) { + // returns true if the logger is invoked by the loading thread before the + // LoggerFinder service is loaded + boolean isLoadingThread() { + return isLoadingThread != null && isLoadingThread.getAsBoolean(); + } + + BootstrapLogger(LazyLoggerAccessor holder, BooleanSupplier isLoadingThread) { this.holder = holder; + this.isLoadingThread = isLoadingThread; } // Temporary data object storing log events @@ -499,14 +508,15 @@ static void log(LogEvent log, PlatformLogger.Bridge logger) { final SecurityManager sm = System.getSecurityManager(); if (sm == null || log.acc == null) { - log.log(logger); + BootstrapExecutors.submit(() -> log.log(logger)); } else { // not sure we can actually use lambda here. We may need to create // an anonymous class. Although if we reach here, then it means // the VM is booted. - AccessController.doPrivileged((PrivilegedAction) () -> { - log.log(logger); return null; - }, log.acc); + BootstrapExecutors.submit(() -> + AccessController.doPrivileged((PrivilegedAction) () -> { + log.log(logger); return null; + }, log.acc)); } } @@ -553,8 +563,9 @@ * @return true if the VM is still bootstrapping. */ boolean checkBootstrapping() { - if (isBooted()) { + if (isBooted() && !isLoadingThread()) { BootstrapExecutors.flush(); + holder.getConcreteLogger(this); return false; } return true; @@ -928,10 +939,16 @@ // - the logging backend is a custom backend // - the logging backend is JUL, there is no custom config, // and the LogManager has not been initialized yet. - public static synchronized boolean useLazyLoggers() { - return !BootstrapLogger.isBooted() - || DetectBackend.detectedBackend == LoggingBackend.CUSTOM - || useSurrogateLoggers(); + public static boolean useLazyLoggers() { + // Note: avoid triggering the initialization of the DetectBackend class + // while holding the BootstrapLogger class monitor + if (!BootstrapLogger.isBooted() || + DetectBackend.detectedBackend == LoggingBackend.CUSTOM) { + return true; + } + synchronized (BootstrapLogger.class) { + return useSurrogateLoggers(); + } } // Called by LazyLoggerAccessor. This method will determine whether @@ -939,9 +956,9 @@ // a SurrogateLogger (if JUL is the default backend and there // is no custom JUL configuration and LogManager is not yet initialized), // or a logger returned by the loaded LoggerFinder (all other cases). - static Logger getLogger(LazyLoggerAccessor accessor) { - if (!BootstrapLogger.isBooted()) { - return new BootstrapLogger(accessor); + static Logger getLogger(LazyLoggerAccessor accessor, BooleanSupplier isLoading) { + if (!BootstrapLogger.isBooted() || isLoading != null && isLoading.getAsBoolean()) { + return new BootstrapLogger(accessor, isLoading); } else { if (useSurrogateLoggers()) { // JUL is the default backend, there is no custom configuration, @@ -957,6 +974,12 @@ } } + // trigger class initialization outside of holding lock + static void ensureBackendDetected() { + assert VM.isBooted() : "VM is not booted"; + // triggers detection of the backend + var backend = DetectBackend.detectedBackend; + } // If the backend is JUL, and there is no custom configuration, and // nobody has attempted to call LogManager.getLogManager() yet, then diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -32,6 +32,9 @@ import java.lang.System.Logger; import java.lang.ref.WeakReference; import java.util.Objects; +import java.util.function.BooleanSupplier; + +import jdk.internal.logger.LoggerFinderLoader.TemporaryLoggerFinder; import jdk.internal.misc.VM; import sun.util.logging.PlatformLogger; @@ -110,6 +113,9 @@ // We need to pass the actual caller module when creating the logger. private final WeakReference moduleRef; + // whether this is the loading thread, can be null + private final BooleanSupplier isLoadingThread; + // The name of the logger that will be created lazyly final String name; // The plain logger SPI object - null until it is accessed for the @@ -122,16 +128,24 @@ private LazyLoggerAccessor(String name, LazyLoggerFactories factories, Module module) { + this(name, factories, module, null); + } + + private LazyLoggerAccessor(String name, + LazyLoggerFactories factories, + Module module, BooleanSupplier isLoading) { + this(Objects.requireNonNull(name), Objects.requireNonNull(factories), - Objects.requireNonNull(module), null); + Objects.requireNonNull(module), isLoading, null); } private LazyLoggerAccessor(String name, LazyLoggerFactories factories, - Module module, Void unused) { + Module module, BooleanSupplier isLoading, Void unused) { this.name = name; this.factories = factories; this.moduleRef = new WeakReference<>(module); + this.isLoadingThread = isLoading; } /** @@ -162,7 +176,7 @@ // BootstrapLogger has the logic to decide whether to invoke the // SPI or use a temporary (BootstrapLogger or SimpleConsoleLogger) // logger. - wrapped = BootstrapLogger.getLogger(this); + wrapped = BootstrapLogger.getLogger(this, isLoadingThread); synchronized(this) { // if w has already been in between, simply drop 'wrapped'. setWrappedIfNotSet(wrapped); @@ -194,7 +208,7 @@ // BootstrapLogger has the logic to decide whether to invoke the // SPI or use a temporary (BootstrapLogger or SimpleConsoleLogger) // logger. - final Logger wrapped = BootstrapLogger.getLogger(this); + final Logger wrapped = BootstrapLogger.getLogger(this, isLoadingThread); synchronized(this) { // if w has already been set, simply drop 'wrapped'. setWrappedIfNotSet(wrapped); @@ -282,10 +296,10 @@ * Creates a new lazy logger accessor for the named logger. The given * factories will be use when it becomes necessary to actually create * the logger. - * @param An interface that extends {@link Logger}. * @param name The logger name. * @param factories The factories that should be used to create the * wrapped logger. + * @param module The module for which the logger is being created * @return A new LazyLoggerAccessor. */ public static LazyLoggerAccessor makeAccessor(String name, @@ -339,6 +353,7 @@ prov = sm == null ? LoggerFinder.getLoggerFinder() : AccessController.doPrivileged( (PrivilegedAction)LoggerFinder::getLoggerFinder); + if (prov instanceof TemporaryLoggerFinder) return prov; provider = prov; } return prov; @@ -358,7 +373,6 @@ new LazyLoggerFactories<>(loggerSupplier); - // A concrete implementation of Logger that delegates to a System.Logger, // but only creates the System.Logger instance lazily when it's used for // the first time. @@ -376,6 +390,11 @@ } } + static Logger makeLazyLogger(String name, Module module, BooleanSupplier isLoading) { + final LazyLoggerAccessor holder = new LazyLoggerAccessor(name, factories, module, isLoading); + return new JdkLazyLogger(holder, null); + } + /** * Gets a logger from the LoggerFinder. Creates the actual concrete * logger. diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -25,6 +25,8 @@ package jdk.internal.logger; import java.io.FilePermission; +import java.lang.System.Logger; +import java.lang.System.LoggerFinder; import java.security.AccessController; import java.security.Permission; import java.security.PrivilegedAction; @@ -32,6 +34,9 @@ import java.util.Locale; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; +import java.util.function.BooleanSupplier; + +import jdk.internal.vm.annotation.Stable; import sun.security.util.SecurityConstants; import sun.security.action.GetPropertyAction; @@ -64,13 +69,28 @@ throw new InternalError("LoggerFinderLoader cannot be instantiated"); } - + // record the loadingThread while loading the backend + static volatile Thread loadingThread; // Return the loaded LoggerFinder, or load it if not already loaded. private static System.LoggerFinder service() { if (service != null) return service; + // ensure backend is detected before attempting to load the finder + BootstrapLogger.ensureBackendDetected(); synchronized(lock) { if (service != null) return service; - service = loadLoggerFinder(); + Thread currentThread = Thread.currentThread(); + if (loadingThread == currentThread) { + // recursive attempt to load the backend while loading the backend + // use a temporary logger finder that returns special BootstrapLogger + // which will wait until loading is finished + return TemporaryLoggerFinder.INSTANCE; + } + loadingThread = currentThread; + try { + service = loadLoggerFinder(); + } finally { + loadingThread = null; + } } // Since the LoggerFinder is already loaded - we can stop using // temporary loggers. @@ -78,6 +98,12 @@ return service; } + // returns true if called by the thread that loads the LoggerFinder, while + // loading the LoggerFinder. + static boolean isLoadingThread() { + return loadingThread != null && loadingThread == Thread.currentThread(); + } + // Get configuration error policy private static ErrorPolicy configurationErrorPolicy() { String errorPolicy = @@ -115,6 +141,34 @@ return iterator; } + public static final class TemporaryLoggerFinder extends LoggerFinder { + private TemporaryLoggerFinder() {} + @Stable + private LoggerFinder loadedService; + + private static final BooleanSupplier isLoadingThread = new BooleanSupplier() { + @Override + public boolean getAsBoolean() { + return LoggerFinderLoader.isLoadingThread(); + } + }; + private static final TemporaryLoggerFinder INSTANCE = new TemporaryLoggerFinder(); + + @Override + public Logger getLogger(String name, Module module) { + if (loadedService == null) { + loadedService = service; + if (loadedService == null) { + return LazyLoggers.makeLazyLogger(name, module, isLoadingThread); + } + } + assert loadedService != null; + assert !LoggerFinderLoader.isLoadingThread(); + assert loadedService != this; + return LazyLoggers.getLogger(name, module); + } + } + // Loads the LoggerFinder using ServiceLoader. If no LoggerFinder // is found returns the default (possibly JUL based) implementation private static System.LoggerFinder loadLoggerFinder() { diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/module-info.java openjdk-lts-11.0.22+7/src/java.base/share/classes/module-info.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/module-info.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/module-info.java 2024-01-09 21:19:49.000000000 +0000 @@ -240,8 +240,9 @@ jdk.naming.dns; exports sun.net.util to java.desktop, + java.net.http, jdk.jconsole, - java.net.http; + jdk.sctp; exports sun.net.www to java.desktop, java.net.http, diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java 2024-01-09 21:19:49.000000000 +0000 @@ -336,8 +336,11 @@ } } + // Thread-local gate to prevent recursive provider lookups + private static ThreadLocal gate = new ThreadLocal<>(); + /** - * Download Certificates from the given AIA and add them to the + * Download certificates from the given AIA and add them to the * specified Collection. */ // cs.getCertificates(caSelector) returns a collection of X509Certificate's @@ -349,32 +352,47 @@ if (Builder.USE_AIA == false) { return false; } + List adList = aiaExt.getAccessDescriptions(); if (adList == null || adList.isEmpty()) { return false; } - boolean add = false; - for (AccessDescription ad : adList) { - CertStore cs = URICertStore.getInstance(ad); - if (cs != null) { - try { - if (certs.addAll((Collection) - cs.getCertificates(caSelector))) { - add = true; - if (!searchAllCertStores) { - return true; + if (gate.get() != null) { + // Avoid recursive fetching of certificates + if (debug != null) { + debug.println("Recursive fetching of certs via the AIA " + + "extension detected"); + } + return false; + } + + gate.set(gate); + try { + boolean add = false; + for (AccessDescription ad : adList) { + CertStore cs = URICertStore.getInstance(ad); + if (cs != null) { + try { + if (certs.addAll((Collection) + cs.getCertificates(caSelector))) { + add = true; + if (!searchAllCertStores) { + return true; + } + } + } catch (CertStoreException cse) { + if (debug != null) { + debug.println("exception getting certs from CertStore:"); + cse.printStackTrace(); } - } - } catch (CertStoreException cse) { - if (debug != null) { - debug.println("exception getting certs from CertStore:"); - cse.printStackTrace(); } } } + return add; + } finally { + gate.set(null); } - return add; } /** diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/rsa/RSAPadding.java openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/rsa/RSAPadding.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/rsa/RSAPadding.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/rsa/RSAPadding.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,7 +30,6 @@ import java.security.*; import java.security.spec.*; -import javax.crypto.BadPaddingException; import javax.crypto.spec.PSource; import javax.crypto.spec.OAEPParameterSpec; @@ -236,24 +235,22 @@ } /** - * Pad the data and return the padded block. + * Pad the data and return the result or null if error occurred. */ - public byte[] pad(byte[] data) throws BadPaddingException { + public byte[] pad(byte[] data) { return pad(data, 0, data.length); } /** - * Pad the data and return the padded block. + * Pad the data and return the result or null if error occurred. */ - public byte[] pad(byte[] data, int ofs, int len) - throws BadPaddingException { + public byte[] pad(byte[] data, int ofs, int len) { if (len > maxDataSize) { - throw new BadPaddingException("Data must be shorter than " - + (maxDataSize + 1) + " bytes but received " - + len + " bytes."); + return null; } switch (type) { case PAD_NONE: + // assert len == paddedSize and data.length - ofs > len? return RSACore.convert(data, ofs, len); case PAD_BLOCKTYPE_1: case PAD_BLOCKTYPE_2: @@ -266,31 +263,30 @@ } /** - * Unpad the padded block and return the data. + * Unpad the padded block and return the result or null if error occurred. */ - public byte[] unpad(byte[] padded) throws BadPaddingException { - if (padded.length != paddedSize) { - throw new BadPaddingException("Decryption error." + - "The padded array length (" + padded.length + - ") is not the specified padded size (" + paddedSize + ")"); - } - switch (type) { - case PAD_NONE: - return padded; - case PAD_BLOCKTYPE_1: - case PAD_BLOCKTYPE_2: - return unpadV15(padded); - case PAD_OAEP_MGF1: - return unpadOAEP(padded); - default: - throw new AssertionError(); + public byte[] unpad(byte[] padded) { + if (padded.length == paddedSize) { + switch (type) { + case PAD_NONE: + return padded; + case PAD_BLOCKTYPE_1: + case PAD_BLOCKTYPE_2: + return unpadV15(padded); + case PAD_OAEP_MGF1: + return unpadOAEP(padded); + default: + throw new AssertionError(); + } + } else { + return null; } } /** * PKCS#1 v1.5 padding (blocktype 1 and 2). */ - private byte[] padV15(byte[] data, int ofs, int len) throws BadPaddingException { + private byte[] padV15(byte[] data, int ofs, int len) { byte[] padded = new byte[paddedSize]; System.arraycopy(data, ofs, padded, paddedSize - len, len); int psSize = paddedSize - 3 - len; @@ -327,10 +323,10 @@ /** * PKCS#1 v1.5 unpadding (blocktype 1 (signature) and 2 (encryption)). - * + * Return the result or null if error occurred. * Note that we want to make it a constant-time operation */ - private byte[] unpadV15(byte[] padded) throws BadPaddingException { + private byte[] unpadV15(byte[] padded) { int k = 0; boolean bp = false; @@ -366,10 +362,8 @@ byte[] data = new byte[n]; System.arraycopy(padded, p, data, 0, n); - BadPaddingException bpe = new BadPaddingException("Decryption error"); - if (bp) { - throw bpe; + return null; } else { return data; } @@ -378,8 +372,9 @@ /** * PKCS#1 v2.0 OAEP padding (MGF1). * Paragraph references refer to PKCS#1 v2.1 (June 14, 2002) + * Return the result or null if error occurred. */ - private byte[] padOAEP(byte[] M, int ofs, int len) throws BadPaddingException { + private byte[] padOAEP(byte[] M, int ofs, int len) { if (random == null) { random = JCAUtil.getSecureRandom(); } @@ -428,8 +423,9 @@ /** * PKCS#1 v2.1 OAEP unpadding (MGF1). + * Return the result or null if error occurred. */ - private byte[] unpadOAEP(byte[] padded) throws BadPaddingException { + private byte[] unpadOAEP(byte[] padded) { byte[] EM = padded; boolean bp = false; int hLen = lHash.length; @@ -485,12 +481,6 @@ byte [] m = new byte[EM.length - mStart]; System.arraycopy(EM, mStart, m, 0, m.length); - BadPaddingException bpe = new BadPaddingException("Decryption error"); - - if (bp) { - throw bpe; - } else { - return m; - } + return (bp? null : m); } } diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/rsa/RSASignature.java openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/rsa/RSASignature.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/rsa/RSASignature.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/rsa/RSASignature.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2023, 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 @@ -189,13 +189,15 @@ try { byte[] encoded = encodeSignature(digestOID, digest); byte[] padded = padding.pad(encoded); - byte[] encrypted = RSACore.rsa(padded, privateKey, true); - return encrypted; + if (padded != null) { + return RSACore.rsa(padded, privateKey, true); + } } catch (GeneralSecurityException e) { throw new SignatureException("Could not sign data", e); } catch (IOException e) { throw new SignatureException("Could not encode data", e); } + throw new SignatureException("Could not sign data"); } // verify the data and return the result. See JCA doc @@ -207,20 +209,29 @@ } try { if (sigBytes.length != RSACore.getByteLength(publicKey)) { - throw new SignatureException("Signature length not correct: got " + + throw new SignatureException("Bad signature length: got " + sigBytes.length + " but was expecting " + RSACore.getByteLength(publicKey)); } - byte[] digest = getDigestValue(); + + // https://www.rfc-editor.org/rfc/rfc8017.html#section-8.2.2 + // Step 4 suggests comparing the encoded message byte[] decrypted = RSACore.rsa(sigBytes, publicKey); - byte[] unpadded = padding.unpad(decrypted); - byte[] decodedDigest = decodeSignature(digestOID, unpadded); - return MessageDigest.isEqual(digest, decodedDigest); + + byte[] digest = getDigestValue(); + + byte[] encoded = encodeSignature(digestOID, digest); + byte[] padded = padding.pad(encoded); + if (MessageDigest.isEqual(padded, decrypted)) { + return true; + } + + // Some vendors might omit the NULL params in digest algorithm + // identifier. Try again. + encoded = encodeSignatureWithoutNULL(digestOID, digest); + padded = padding.pad(encoded); + return MessageDigest.isEqual(padded, decrypted); } catch (javax.crypto.BadPaddingException e) { - // occurs if the app has used the wrong RSA public key - // or if sigBytes is invalid - // return false rather than propagating the exception for - // compatibility/ease of use return false; } catch (IOException e) { throw new SignatureException("Signature encoding error", e); @@ -244,27 +255,19 @@ } /** - * Decode the signature data. Verify that the object identifier matches - * and return the message digest. + * Encode the digest without the NULL params, return the to-be-signed data. + * This is only used by SunRsaSign. */ - public static byte[] decodeSignature(ObjectIdentifier oid, byte[] sig) + static byte[] encodeSignatureWithoutNULL(ObjectIdentifier oid, byte[] digest) throws IOException { - // Enforce strict DER checking for signatures - DerInputStream in = new DerInputStream(sig, 0, sig.length, false); - DerValue[] values = in.getSequence(2); - if ((values.length != 2) || (in.available() != 0)) { - throw new IOException("SEQUENCE length error"); - } - AlgorithmId algId = AlgorithmId.parse(values[0]); - if (algId.getOID().equals(oid) == false) { - throw new IOException("ObjectIdentifier mismatch: " - + algId.getOID()); - } - if (algId.getEncodedParams() != null) { - throw new IOException("Unexpected AlgorithmId parameters"); - } - byte[] digest = values[1].getOctetString(); - return digest; + DerOutputStream out = new DerOutputStream(); + DerOutputStream oidout = new DerOutputStream(); + oidout.putOID(oid); + out.write(DerValue.tag_Sequence, oidout); + out.putOctetString(digest); + DerValue result = + new DerValue(DerValue.tag_Sequence, out.toByteArray()); + return result.toByteArray(); } // set parameter, not supported. See JCA doc diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/util/KeyUtil.java openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/util/KeyUtil.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/util/KeyUtil.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/util/KeyUtil.java 2024-01-09 21:19:49.000000000 +0000 @@ -254,13 +254,14 @@ * contains the lower of that suggested by the client in the client * hello and the highest supported by the server. * @param encoded the encoded key in its "RAW" encoding format - * @param isFailOver whether or not the previous decryption of the - * encrypted PreMasterSecret message run into problem + * @param failure true if encoded is incorrect according to previous checks * @return the polished PreMasterSecret key in its "RAW" encoding format */ public static byte[] checkTlsPreMasterSecretKey( int clientVersion, int serverVersion, SecureRandom random, - byte[] encoded, boolean isFailOver) { + byte[] encoded, boolean failure) { + + byte[] tmp; if (random == null) { random = JCAUtil.getSecureRandom(); @@ -268,30 +269,38 @@ byte[] replacer = new byte[48]; random.nextBytes(replacer); - if (!isFailOver && (encoded != null)) { - // check the length - if (encoded.length != 48) { - // private, don't need to clone the byte array. - return replacer; - } - - int encodedVersion = - ((encoded[0] & 0xFF) << 8) | (encoded[1] & 0xFF); - if (clientVersion != encodedVersion) { - if (clientVersion > 0x0301 || // 0x0301: TLSv1 - serverVersion != encodedVersion) { - encoded = replacer; - } // Otherwise, For compatibility, we maintain the behavior - // that the version in pre_master_secret can be the - // negotiated version for TLS v1.0 and SSL v3.0. - } + if (failure) { + tmp = replacer; + } else { + tmp = encoded; + } + if (tmp == null) { + encoded = replacer; + } else { + encoded = tmp; + } + // check the length + if (encoded.length != 48) { // private, don't need to clone the byte array. - return encoded; + tmp = replacer; + } else { + tmp = encoded; } - // private, don't need to clone the byte array. - return replacer; + int encodedVersion = + ((tmp[0] & 0xFF) << 8) | (tmp[1] & 0xFF); + int check1 = 0; + int check2 = 0; + int check3 = 0; + if (clientVersion != encodedVersion) check1 = 1; + if (clientVersion > 0x0301) check2 = 1; + if (serverVersion != encodedVersion) check3 = 1; + if ((check1 & (check2 | check3)) == 1) { + return replacer; + } else { + return tmp; + } } /** diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java --- openjdk-lts-11.0.21+9/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java 2024-01-09 21:19:49.000000000 +0000 @@ -852,16 +852,16 @@ * the maximum allowed number of bytes for the signature-related files * in a JAR file. */ - Integer tmp = GetIntegerAction.privilegedGetProperty( - "jdk.jar.maxSignatureFileSize", 8000000); + int tmp = GetIntegerAction.privilegedGetProperty( + "jdk.jar.maxSignatureFileSize", 16000000); if (tmp < 0 || tmp > MAX_ARRAY_SIZE) { if (debug != null) { - debug.println("Default signature file size 8000000 bytes " + - "is used as the specified size for the " + - "jdk.jar.maxSignatureFileSize system property " + + debug.println("The default signature file size of 16000000 bytes " + + "will be used for the jdk.jar.maxSignatureFileSize " + + "system property since the specified value " + "is out of range: " + tmp); } - tmp = 8000000; + tmp = 16000000; } return tmp; } diff -Nru openjdk-lts-11.0.21+9/src/java.base/share/native/libverify/check_code.c openjdk-lts-11.0.22+7/src/java.base/share/native/libverify/check_code.c --- openjdk-lts-11.0.21+9/src/java.base/share/native/libverify/check_code.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/share/native/libverify/check_code.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2023, 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 @@ -84,6 +84,7 @@ #include #include #include +#include #include "jni.h" #include "jni_util.h" @@ -1210,7 +1211,7 @@ } } if (opcode == JVM_OPC_tableswitch) { - keys = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]) + 1; + keys = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]) + 1; delta = 1; } else { keys = _ck_ntohl(lpc[1]); /* number of pairs */ @@ -1692,11 +1693,13 @@ switch (instruction) { case JVM_OPC_tableswitch: { int *lpc = (int *)UCALIGN(iptr + 1); - int index; if (lpc + 2 >= (int *)end) { return -1; /* do not read pass the end */ } - index = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]); + int64_t low = _ck_ntohl(lpc[1]); + int64_t high = _ck_ntohl(lpc[2]); + int64_t index = high - low; + // The value of low must be less than or equal to high - i.e. index >= 0 if ((index < 0) || (index > 65535)) { return -1; /* illegal */ } else { diff -Nru openjdk-lts-11.0.21+9/src/java.base/unix/native/jspawnhelper/jspawnhelper.c openjdk-lts-11.0.22+7/src/java.base/unix/native/jspawnhelper/jspawnhelper.c --- openjdk-lts-11.0.21+9/src/java.base/unix/native/jspawnhelper/jspawnhelper.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/unix/native/jspawnhelper/jspawnhelper.c 2024-01-09 21:19:49.000000000 +0000 @@ -134,10 +134,10 @@ ChildStuff c; int t; struct stat buf; - /* argv[0] contains the fd number to read all the child info */ + /* argv[1] contains the fd number to read all the child info */ int r, fdin, fdout; - r = sscanf (argv[argc-1], "%d:%d", &fdin, &fdout); + r = sscanf (argv[1], "%d:%d", &fdin, &fdout); if (r == 2 && fcntl(fdin, F_GETFD) != -1) { fstat(fdin, &buf); if (!S_ISFIFO(buf.st_mode)) diff -Nru openjdk-lts-11.0.21+9/src/java.base/unix/native/libjava/ProcessImpl_md.c openjdk-lts-11.0.22+7/src/java.base/unix/native/libjava/ProcessImpl_md.c --- openjdk-lts-11.0.21+9/src/java.base/unix/native/libjava/ProcessImpl_md.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/unix/native/libjava/ProcessImpl_md.c 2024-01-09 21:19:49.000000000 +0000 @@ -394,16 +394,20 @@ jboolean isCopy; int i, offset, rval, bufsize, magic; char *buf, buf1[16]; - char *hlpargs[2]; + char *hlpargs[3]; SpawnInfo sp; /* need to tell helper which fd is for receiving the childstuff * and which fd to send response back on */ snprintf(buf1, sizeof(buf1), "%d:%d", c->childenv[0], c->fail[1]); - /* put the fd string as argument to the helper cmd */ - hlpargs[0] = buf1; - hlpargs[1] = 0; + /* NULL-terminated argv array. + * argv[0] contains path to jspawnhelper, to follow conventions. + * argv[1] contains the fd string as argument to jspawnhelper + */ + hlpargs[0] = (char*)helperpath; + hlpargs[1] = buf1; + hlpargs[2] = NULL; /* Following items are sent down the pipe to the helper * after it is spawned. diff -Nru openjdk-lts-11.0.21+9/src/java.base/unix/native/libjsig/jsig.c openjdk-lts-11.0.22+7/src/java.base/unix/native/libjsig/jsig.c --- openjdk-lts-11.0.21+9/src/java.base/unix/native/libjsig/jsig.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/unix/native/libjsig/jsig.c 2024-01-09 21:19:49.000000000 +0000 @@ -278,17 +278,28 @@ signal_unlock(); return 0; } else if (jvm_signal_installing) { - /* jvm is installing its signal handlers. Install the new - * handlers and save the old ones. */ + /* jvm is installing its signal handlers. + * - if this is a modifying sigaction call, we install a new signal handler and store the old one + * as chained signal handler. + * - if this is a non-modifying sigaction call, we don't change any state; we just return the existing + * signal handler in the system (not the stored one). + * This works under the assumption that there is only one modifying sigaction call for a specific signal + * within the JVM_begin_signal_setting-JVM_end_signal_setting-window. There can be any number of non-modifying + * calls, but they will only return the expected preexisting handler if executed before the modifying call. + */ res = call_os_sigaction(sig, act, &oldAct); - sact[sig] = oldAct; - if (oact != NULL) { - *oact = oldAct; + if (res == 0) { + if (act != NULL) { + /* store pre-existing handler as chained handler */ + sact[sig] = oldAct; + /* Record the signals used by jvm. */ + sigaddset(&jvmsigs, sig); + } + if (oact != NULL) { + *oact = oldAct; + } } - /* Record the signals used by jvm. */ - sigaddset(&jvmsigs, sig); - signal_unlock(); return res; } else { diff -Nru openjdk-lts-11.0.21+9/src/java.base/unix/native/libnio/ch/DatagramDispatcher.c openjdk-lts-11.0.22+7/src/java.base/unix/native/libnio/ch/DatagramDispatcher.c --- openjdk-lts-11.0.21+9/src/java.base/unix/native/libnio/ch/DatagramDispatcher.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/unix/native/libnio/ch/DatagramDispatcher.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -23,32 +23,30 @@ * questions. */ -/* - */ - -#include "jni.h" -#include "jni_util.h" -#include "jvm.h" -#include "jlong.h" -#include "sun_nio_ch_DatagramDispatcher.h" #include #include #include #include +#include +#include "jni.h" +#include "jni_util.h" +#include "jvm.h" +#include "jlong.h" +#include "nio.h" #include "nio_util.h" -#include +#include "sun_nio_ch_DatagramDispatcher.h" JNIEXPORT jint JNICALL Java_sun_nio_ch_DatagramDispatcher_read0(JNIEnv *env, jclass clazz, - jobject fdo, jlong address, jint len) + jobject fdo, jlong address, jint len) { jint fd = fdval(env, fdo); void *buf = (void *)jlong_to_ptr(address); int result = recv(fd, buf, len, 0); if (result < 0 && errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); - return -2; + return IOS_THROWN; } return convertReturnVal(env, result, JNI_TRUE); } @@ -56,7 +54,7 @@ JNIEXPORT jlong JNICALL Java_sun_nio_ch_DatagramDispatcher_readv0(JNIEnv *env, jclass clazz, - jobject fdo, jlong address, jint len) + jobject fdo, jlong address, jint len) { jint fd = fdval(env, fdo); ssize_t result = 0; @@ -74,28 +72,28 @@ result = recvmsg(fd, &m, 0); if (result < 0 && errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); - return -2; + return IOS_THROWN; } return convertLongReturnVal(env, (jlong)result, JNI_TRUE); } JNIEXPORT jint JNICALL Java_sun_nio_ch_DatagramDispatcher_write0(JNIEnv *env, jclass clazz, - jobject fdo, jlong address, jint len) + jobject fdo, jlong address, jint len) { jint fd = fdval(env, fdo); void *buf = (void *)jlong_to_ptr(address); int result = send(fd, buf, len, 0); if (result < 0 && errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); - return -2; + return IOS_THROWN; } return convertReturnVal(env, result, JNI_FALSE); } JNIEXPORT jlong JNICALL Java_sun_nio_ch_DatagramDispatcher_writev0(JNIEnv *env, jclass clazz, - jobject fdo, jlong address, jint len) + jobject fdo, jlong address, jint len) { jint fd = fdval(env, fdo); struct iovec *iov = (struct iovec *)jlong_to_ptr(address); @@ -113,7 +111,7 @@ result = sendmsg(fd, &m, 0); if (result < 0 && errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); - return -2; + return IOS_THROWN; } return convertLongReturnVal(env, (jlong)result, JNI_FALSE); } diff -Nru openjdk-lts-11.0.21+9/src/java.base/windows/native/libnio/ch/DatagramDispatcher.c openjdk-lts-11.0.22+7/src/java.base/windows/native/libnio/ch/DatagramDispatcher.c --- openjdk-lts-11.0.21+9/src/java.base/windows/native/libnio/ch/DatagramDispatcher.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.base/windows/native/libnio/ch/DatagramDispatcher.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -23,21 +23,19 @@ * questions. */ -/* - */ - #include #include #include + #include "jni.h" #include "jni_util.h" #include "jvm.h" #include "jlong.h" -#include "sun_nio_ch_DatagramDispatcher.h" - #include "nio.h" #include "nio_util.h" +#include "sun_nio_ch_DatagramDispatcher.h" + /************************************************************** * DatagramDispatcher.c @@ -45,7 +43,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_DatagramDispatcher_read0(JNIEnv *env, jclass clazz, jobject fdo, - jlong address, jint len) + jlong address, jint len) { /* set up */ int i = 0; @@ -69,16 +67,18 @@ if (i == SOCKET_ERROR) { int theErr = (jint)WSAGetLastError(); - if (theErr == WSAEWOULDBLOCK) { - return IOS_UNAVAILABLE; - } - if (theErr == WSAECONNRESET) { - purgeOutstandingICMP(env, clazz, fd); - JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); + if (theErr != WSAEMSGSIZE) { + if (theErr == WSAEWOULDBLOCK) { + return IOS_UNAVAILABLE; + } + if (theErr == WSAECONNRESET) { + purgeOutstandingICMP(env, clazz, fd); + JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0); + return IOS_THROWN; + } + JNU_ThrowIOExceptionWithLastError(env, "WSARecv failed"); return IOS_THROWN; } - JNU_ThrowIOExceptionWithLastError(env, "Write failed"); - return IOS_THROWN; } return convertReturnVal(env, (jint)read, JNI_TRUE); @@ -104,7 +104,7 @@ for(i=0; i soundbanks = new ArrayList<>(); diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/share/classes/javax/swing/ProgressMonitorInputStream.java openjdk-lts-11.0.22+7/src/java.desktop/share/classes/javax/swing/ProgressMonitorInputStream.java --- openjdk-lts-11.0.21+9/src/java.desktop/share/classes/javax/swing/ProgressMonitorInputStream.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/share/classes/javax/swing/ProgressMonitorInputStream.java 2024-01-09 21:19:49.000000000 +0000 @@ -67,7 +67,8 @@ private ProgressMonitor monitor; private int nread = 0; private int size = 0; - + Component parentComponent; + Object message; /** * Constructs an object to monitor the progress of an input stream. @@ -88,6 +89,8 @@ catch(IOException ioe) { size = 0; } + this.parentComponent = parentComponent; + this.message = message; monitor = new ProgressMonitor(parentComponent, message, null, 0, size); } @@ -119,6 +122,25 @@ return c; } + private void setProgress(int nr) throws IOException { + if (nr > 0) { + if (nread + nr > nread) { + monitor.setProgress(nread += nr); + } else { + size = in.available(); + nread = 0; + monitor.close(); + monitor = new ProgressMonitor(this.parentComponent, + this.message, null, 0, size); + } + } + if (monitor.isCanceled()) { + InterruptedIOException exc = + new InterruptedIOException("progress"); + exc.bytesTransferred = nread; + throw exc; + } + } /** * Overrides FilterInputStream.read @@ -126,13 +148,7 @@ */ public int read(byte b[]) throws IOException { int nr = in.read(b); - if (nr > 0) monitor.setProgress(nread += nr); - if (monitor.isCanceled()) { - InterruptedIOException exc = - new InterruptedIOException("progress"); - exc.bytesTransferred = nread; - throw exc; - } + setProgress(nr); return nr; } @@ -145,13 +161,7 @@ int off, int len) throws IOException { int nr = in.read(b, off, len); - if (nr > 0) monitor.setProgress(nread += nr); - if (monitor.isCanceled()) { - InterruptedIOException exc = - new InterruptedIOException("progress"); - exc.bytesTransferred = nread; - throw exc; - } + setProgress(nr); return nr; } @@ -162,7 +172,13 @@ */ public long skip(long n) throws IOException { long nr = in.skip(n); - if (nr > 0) monitor.setProgress(nread += nr); + if (nr > 0) { + if ((int)(nread + nr) > nread) { + monitor.setProgress(nread += nr); + } else { + monitor.setProgress(monitor.getMaximum()); + } + } return nr; } diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/share/classes/javax/swing/colorchooser/ColorPanel.java openjdk-lts-11.0.22+7/src/java.desktop/share/classes/javax/swing/colorchooser/ColorPanel.java --- openjdk-lts-11.0.21+9/src/java.desktop/share/classes/javax/swing/colorchooser/ColorPanel.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/share/classes/javax/swing/colorchooser/ColorPanel.java 2024-01-09 21:19:49.000000000 +0000 @@ -99,8 +99,6 @@ add(spinner.getSpinner(), gbc); gbc.insets.top = 5; } - setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy()); - setFocusTraversalPolicyProvider(true); setFocusable(false); this.model = model; diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/share/classes/sun/font/PhysicalFont.java openjdk-lts-11.0.22+7/src/java.desktop/share/classes/sun/font/PhysicalFont.java --- openjdk-lts-11.0.21+9/src/java.desktop/share/classes/sun/font/PhysicalFont.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/share/classes/sun/font/PhysicalFont.java 2024-01-09 21:19:49.000000000 +0000 @@ -41,12 +41,19 @@ protected Object nativeNames; public boolean equals(Object o) { - return (o != null && o.getClass() == this.getClass() && - ((Font2D)o).fullName.equals(this.fullName)); + if (o == null || o.getClass() != this.getClass()) { + return false; + } + PhysicalFont other = (PhysicalFont)o; + return + (this.fullName.equals(other.fullName)) && + ((this.platName == null && other.platName == null) || + (this.platName != null && this.platName.equals(other.platName))); } public int hashCode() { - return fullName.hashCode(); + return fullName.hashCode() + + (platName != null ? platName.hashCode() : 0); } /** diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/share/classes/sun/swing/CachedPainter.java openjdk-lts-11.0.22+7/src/java.desktop/share/classes/sun/swing/CachedPainter.java --- openjdk-lts-11.0.21+9/src/java.desktop/share/classes/sun/swing/CachedPainter.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/share/classes/sun/swing/CachedPainter.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2023, 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 @@ -314,8 +314,9 @@ @Override public Image getResolutionVariant(double destWidth, double destHeight) { - int w = (int) Math.ceil(destWidth); - int h = (int) Math.ceil(destHeight); + int w = (int) Math.floor(destWidth + 0.5); + int h = (int) Math.floor(destHeight + 0.5); + return getImage(PainterMultiResolutionCachedImage.class, c, baseWidth, baseHeight, w, h, args); } diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/share/native/libfontmanager/freetypeScaler.c openjdk-lts-11.0.22+7/src/java.desktop/share/native/libfontmanager/freetypeScaler.c --- openjdk-lts-11.0.21+9/src/java.desktop/share/native/libfontmanager/freetypeScaler.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/share/native/libfontmanager/freetypeScaler.c 2024-01-09 21:19:49.000000000 +0000 @@ -443,10 +443,10 @@ ptsz = 1.0; } context->ptsz = (int)(ptsz * 64); - context->transform.xx = FloatToFTFixed((float)dmat[0]/ptsz); - context->transform.yx = -FloatToFTFixed((float)dmat[1]/ptsz); - context->transform.xy = -FloatToFTFixed((float)dmat[2]/ptsz); - context->transform.yy = FloatToFTFixed((float)dmat[3]/ptsz); + context->transform.xx = FloatToFTFixed((float)(dmat[0]/ptsz)); + context->transform.yx = -FloatToFTFixed((float)(dmat[1]/ptsz)); + context->transform.xy = -FloatToFTFixed((float)(dmat[2]/ptsz)); + context->transform.yy = FloatToFTFixed((float)(dmat[3]/ptsz)); context->aaType = aa; context->fmType = fm; diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java openjdk-lts-11.0.22+7/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java --- openjdk-lts-11.0.21+9/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, 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 @@ -147,7 +147,7 @@ } void removeAll() { - items.removeAll(items); + items.clear(); updateScrollbars(); } diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/TMSchema.java openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/TMSchema.java --- openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/TMSchema.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/TMSchema.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023, 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 @@ -40,10 +40,13 @@ package com.sun.java.swing.plaf.windows; -import java.awt.*; -import java.util.*; - -import javax.swing.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.Point; +import java.util.EnumMap; +import javax.swing.JComponent; import sun.awt.windows.ThemeReader; @@ -55,7 +58,7 @@ * * @author Leif Samuelsson */ -class TMSchema { +public final class TMSchema { /** * An enumeration of the various Windows controls (also known as diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/XPStyle.java openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/XPStyle.java --- openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/XPStyle.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/XPStyle.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2023, 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 @@ -40,14 +40,41 @@ package com.sun.java.swing.plaf.windows; -import java.awt.*; -import java.awt.image.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Image; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.awt.image.DataBufferInt; +import java.awt.image.WritableRaster; import java.security.AccessController; -import java.util.*; +import java.util.HashMap; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.plaf.*; +import javax.swing.AbstractButton; +import javax.swing.CellRendererPane; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JRadioButton; +import javax.swing.JToolBar; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.border.AbstractBorder; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.LineBorder; +import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.InsetsUIResource; +import javax.swing.plaf.UIResource; import javax.swing.text.JTextComponent; import sun.awt.image.SunWritableRaster; @@ -55,8 +82,10 @@ import sun.security.action.GetPropertyAction; import sun.swing.CachedPainter; -import static com.sun.java.swing.plaf.windows.TMSchema.*; - +import static com.sun.java.swing.plaf.windows.TMSchema.Part; +import static com.sun.java.swing.plaf.windows.TMSchema.Prop; +import static com.sun.java.swing.plaf.windows.TMSchema.State; +import static com.sun.java.swing.plaf.windows.TMSchema.TypeEnum; /** * Implements Windows XP Styles for the Windows Look and Feel. @@ -675,6 +704,11 @@ w = bi.getWidth(); h = bi.getHeight(); + // Get DPI to pass further to ThemeReader.paintBackground() + Graphics2D g2d = (Graphics2D) g; + AffineTransform at = g2d.getTransform(); + int dpi = (int)(at.getScaleX() * 96); + WritableRaster raster = bi.getRaster(); DataBufferInt dbi = (DataBufferInt)raster.getDataBuffer(); // Note that stealData() requires a markDirty() afterwards @@ -682,7 +716,8 @@ ThemeReader.paintBackground(SunWritableRaster.stealData(dbi, 0), part.getControlName(c), part.getValue(), State.getValue(part, state), - 0, 0, w, h, w); + 0, 0, w, h, w, dpi); + SunWritableRaster.markDirty(dbi); } diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java --- openjdk-lts-11.0.21+9/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,11 +30,14 @@ import java.awt.Insets; import java.awt.Point; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; +import static com.sun.java.swing.plaf.windows.TMSchema.Part; + /* !!!! WARNING !!!! * This class has to be in sync with * src/solaris/classes/sun/awt/windows/ThemeReader.java @@ -51,7 +54,24 @@ */ public final class ThemeReader { - private static final Map widgetToTheme = new HashMap<>(); + private static final int defaultDPI = 96; + + /** + * List of widgets for which we need to get the part size for the current DPI. + */ + private static final List partSizeWidgets = + List.of("MENU", "BUTTON"); + + /** + * List of widget parts for which we need to get the part size for the current DPI. + */ + private static final List partSizeWidgetParts = + List.of(Part.BP_RADIOBUTTON.getValue(), + Part.BP_CHECKBOX.getValue(), + Part.MP_POPUPCHECK.getValue()); + + private static final Map> dpiAwareWidgetToTheme + = new HashMap<>(); // lock for the cache // reading should be done with readLock @@ -87,28 +107,30 @@ return xpStyleEnabled; } + private static Long openThemeImpl(String widget, int dpi) { + Long theme; + int i = widget.indexOf("::"); + if (i > 0) { + // We're using the syntax "subAppName::controlName" here, as used by msstyles. + // See documentation for SetWindowTheme on MSDN. + setWindowTheme(widget.substring(0, i)); + theme = openTheme(widget.substring(i + 2), dpi); + setWindowTheme(null); + } else { + theme = openTheme(widget, dpi); + } + return theme; + } + // this should be called only with writeLock held - private static Long getThemeImpl(String widget) { - Long theme = widgetToTheme.get(widget); - if (theme == null) { - int i = widget.indexOf("::"); - if (i > 0) { - // We're using the syntax "subAppName::controlName" here, as used by msstyles. - // See documentation for SetWindowTheme on MSDN. - setWindowTheme(widget.substring(0, i)); - theme = openTheme(widget.substring(i+2)); - setWindowTheme(null); - } else { - theme = openTheme(widget); - } - widgetToTheme.put(widget, theme); - } - return theme; + private static Long getThemeImpl(String widget, int dpi) { + return dpiAwareWidgetToTheme.computeIfAbsent(dpi, key -> new HashMap<>()) + .computeIfAbsent(widget, w -> openThemeImpl(widget, dpi)); } // returns theme value // this method should be invoked with readLock locked - private static Long getTheme(String widget) { + private static Long getTheme(String widget, int dpi) { if (!isThemed) { throw new IllegalStateException("Themes are not loaded"); } @@ -118,10 +140,12 @@ try { if (!valid) { // Close old themes. - for (Long value : widgetToTheme.values()) { - closeTheme(value); + for (Map dpiVal : dpiAwareWidgetToTheme.values()) { + for (Long value : dpiVal.values()) { + closeTheme(value); + } } - widgetToTheme.clear(); + dpiAwareWidgetToTheme.clear(); valid = true; } } finally { @@ -130,13 +154,20 @@ } } + Long theme = null; + + Map widgetToTheme = dpiAwareWidgetToTheme.get(dpi); + + if (widgetToTheme != null) { + theme = widgetToTheme.get(widget); + } + // mostly copied from the javadoc for ReentrantReadWriteLock - Long theme = widgetToTheme.get(widget); if (theme == null) { readLock.unlock(); writeLock.lock(); try { - theme = getThemeImpl(widget); + theme = getThemeImpl(widget, dpi); } finally { readLock.lock(); writeLock.unlock();// Unlock write, still hold read @@ -146,14 +177,23 @@ } private static native void paintBackground(int[] buffer, long theme, - int part, int state, int x, - int y, int w, int h, int stride); + int part, int state, + int rectRight, int rectBottom, + int w, int h, int stride); public static void paintBackground(int[] buffer, String widget, - int part, int state, int x, int y, int w, int h, int stride) { + int part, int state, int x, int y, int w, int h, int stride, int dpi) { readLock.lock(); try { - paintBackground(buffer, getTheme(widget), part, state, x, y, w, h, stride); + /* For widgets and parts in the lists, we get the part size + for the current screen DPI to scale them better. */ + Dimension d = (partSizeWidgets.contains(widget) + && partSizeWidgetParts.contains(Integer.valueOf(part))) + ? getPartSize(getTheme(widget, dpi), part, state) + : new Dimension(w, h); + + paintBackground(buffer, getTheme(widget, dpi), part, state, + d.width, d.height, w, h, stride); } finally { readLock.unlock(); } @@ -165,7 +205,7 @@ public static Insets getThemeMargins(String widget, int part, int state, int marginType) { readLock.lock(); try { - return getThemeMargins(getTheme(widget), part, state, marginType); + return getThemeMargins(getTheme(widget, defaultDPI), part, state, marginType); } finally { readLock.unlock(); } @@ -176,7 +216,7 @@ public static boolean isThemePartDefined(String widget, int part, int state) { readLock.lock(); try { - return isThemePartDefined(getTheme(widget), part, state); + return isThemePartDefined(getTheme(widget, defaultDPI), part, state); } finally { readLock.unlock(); } @@ -188,7 +228,7 @@ public static Color getColor(String widget, int part, int state, int property) { readLock.lock(); try { - return getColor(getTheme(widget), part, state, property); + return getColor(getTheme(widget, defaultDPI), part, state, property); } finally { readLock.unlock(); } @@ -200,7 +240,7 @@ public static int getInt(String widget, int part, int state, int property) { readLock.lock(); try { - return getInt(getTheme(widget), part, state, property); + return getInt(getTheme(widget, defaultDPI), part, state, property); } finally { readLock.unlock(); } @@ -212,7 +252,7 @@ public static int getEnum(String widget, int part, int state, int property) { readLock.lock(); try { - return getEnum(getTheme(widget), part, state, property); + return getEnum(getTheme(widget, defaultDPI), part, state, property); } finally { readLock.unlock(); } @@ -225,7 +265,7 @@ int property) { readLock.lock(); try { - return getBoolean(getTheme(widget), part, state, property); + return getBoolean(getTheme(widget, defaultDPI), part, state, property); } finally { readLock.unlock(); } @@ -236,7 +276,7 @@ public static boolean getSysBoolean(String widget, int property) { readLock.lock(); try { - return getSysBoolean(getTheme(widget), property); + return getSysBoolean(getTheme(widget, defaultDPI), property); } finally { readLock.unlock(); } @@ -248,7 +288,7 @@ public static Point getPoint(String widget, int part, int state, int property) { readLock.lock(); try { - return getPoint(getTheme(widget), part, state, property); + return getPoint(getTheme(widget, defaultDPI), part, state, property); } finally { readLock.unlock(); } @@ -261,7 +301,7 @@ int property) { readLock.lock(); try { - return getPosition(getTheme(widget), part,state,property); + return getPosition(getTheme(widget, defaultDPI), part,state,property); } finally { readLock.unlock(); } @@ -273,13 +313,13 @@ public static Dimension getPartSize(String widget, int part, int state) { readLock.lock(); try { - return getPartSize(getTheme(widget), part, state); + return getPartSize(getTheme(widget, defaultDPI), part, state); } finally { readLock.unlock(); } } - private static native long openTheme(String widget); + private static native long openTheme(String widget, int dpi); private static native void closeTheme(long theme); @@ -292,8 +332,9 @@ int stateFrom, int stateTo, int propId) { readLock.lock(); try { - return getThemeTransitionDuration(getTheme(widget), - part, stateFrom, stateTo, propId); + return getThemeTransitionDuration(getTheme(widget, defaultDPI), + part, stateFrom, stateTo, + propId); } finally { readLock.unlock(); } @@ -308,8 +349,9 @@ int part, int state, int boundingWidth, int boundingHeight) { readLock.lock(); try { - return getThemeBackgroundContentMargins(getTheme(widget), - part, state, boundingWidth, boundingHeight); + return getThemeBackgroundContentMargins(getTheme(widget, defaultDPI), + part, state, + boundingWidth, boundingHeight); } finally { readLock.unlock(); } diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp openjdk-lts-11.0.22+7/src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp --- openjdk-lts-11.0.21+9/src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -90,7 +90,7 @@ typedef HRESULT(__stdcall *PFNDRAWTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect); -typedef HTHEME(__stdcall *PFNOPENTHEMEDATA)(HWND hwnd, LPCWSTR pszClassList); +typedef HTHEME(__stdcall *PFNOPENTHEMEDATAFORDPI)(HWND hwnd, LPCWSTR pszClassList, UINT dpi); typedef HRESULT (__stdcall *PFNDRAWTHEMETEXT)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, @@ -134,7 +134,7 @@ (HTHEME hTheme, int iPartId, int iStateIdFrom, int iStateIdTo, int iPropId, DWORD *pdwDuration); -static PFNOPENTHEMEDATA OpenThemeData = NULL; +static PFNOPENTHEMEDATAFORDPI OpenThemeDataForDpiFunc = NULL; static PFNDRAWTHEMEBACKGROUND DrawThemeBackground = NULL; static PFNCLOSETHEMEDATA CloseThemeData = NULL; static PFNDRAWTHEMETEXT DrawThemeText = NULL; @@ -161,8 +161,8 @@ DTRACE_PRINTLN1("InitThemes hModThemes = %x\n", hModThemes); if(hModThemes) { DTRACE_PRINTLN("Loaded UxTheme.dll\n"); - OpenThemeData = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes, - "OpenThemeData"); + OpenThemeDataForDpiFunc = (PFNOPENTHEMEDATAFORDPI)GetProcAddress( + hModThemes, "OpenThemeDataForDpi"); DrawThemeBackground = (PFNDRAWTHEMEBACKGROUND)GetProcAddress( hModThemes, "DrawThemeBackground"); CloseThemeData = (PFNCLOSETHEMEDATA)GetProcAddress( @@ -198,7 +198,7 @@ (PFNGETTHEMETRANSITIONDURATION)GetProcAddress(hModThemes, "GetThemeTransitionDuration"); - if(OpenThemeData + if(OpenThemeDataForDpiFunc && DrawThemeBackground && CloseThemeData && DrawThemeText @@ -216,9 +216,12 @@ && IsThemeBackgroundPartiallyTransparent ) { DTRACE_PRINTLN("Loaded function pointers.\n"); - // We need to make sure we can load the Theme. This may not be - // the case on a WinXP machine with classic mode enabled. - HTHEME hTheme = OpenThemeData(AwtToolkit::GetInstance().GetHWnd(), L"Button"); + // We need to make sure we can load the Theme. + // Use the default DPI value of 96 on windows. + constexpr unsigned int defaultDPI = 96; + HTHEME hTheme = OpenThemeDataForDpiFunc ( + AwtToolkit::GetInstance().GetHWnd(), + L"Button", defaultDPI); if(hTheme) { DTRACE_PRINTLN("Loaded Theme data.\n"); CloseThemeData(hTheme); @@ -275,7 +278,7 @@ * Signature: (Ljava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_sun_awt_windows_ThemeReader_openTheme -(JNIEnv *env, jclass klass, jstring widget) { +(JNIEnv *env, jclass klass, jstring widget, jint dpi) { LPCTSTR str = (LPCTSTR) JNU_GetStringPlatformChars(env, widget, NULL); if (str == NULL) { @@ -284,7 +287,9 @@ } // We need to open the Theme on a Window that will stick around. // The best one for that purpose is the Toolkit window. - HTHEME htheme = OpenThemeData(AwtToolkit::GetInstance().GetHWnd(), str); + HTHEME htheme = OpenThemeDataForDpiFunc( + AwtToolkit::GetInstance().GetHWnd(), + str, dpi); JNU_ReleaseStringPlatformChars(env, widget, str); return (jlong) htheme; } @@ -417,7 +422,7 @@ */ JNIEXPORT void JNICALL Java_sun_awt_windows_ThemeReader_paintBackground (JNIEnv *env, jclass klass, jintArray array, jlong theme, jint part, jint state, - jint x, jint y, jint w, jint h, jint stride) { + jint rectRight, jint rectBottom, jint w, jint h, jint stride) { int *pDstBits=NULL; int *pSrcBits=NULL; @@ -463,8 +468,8 @@ rect.left = 0; rect.top = 0; - rect.bottom = h; - rect.right = w; + rect.bottom = rectBottom; + rect.right = rectRight; ZeroMemory(pSrcBits,(BITS_PER_PIXEL>>3)*w*h); @@ -753,27 +758,6 @@ return NULL; } -void rescale(SIZE *size) { - static int dpiX = -1; - static int dpiY = -1; - if (dpiX == -1 || dpiY == -1) { - HWND hWnd = ::GetDesktopWindow(); - HDC hDC = ::GetDC(hWnd); - dpiX = ::GetDeviceCaps(hDC, LOGPIXELSX); - dpiY = ::GetDeviceCaps(hDC, LOGPIXELSY); - ::ReleaseDC(hWnd, hDC); - } - - if (dpiX !=0 && dpiX != 96) { - float invScaleX = 96.0f / dpiX; - size->cx = ROUND_TO_INT(size->cx * invScaleX); - } - if (dpiY != 0 && dpiY != 96) { - float invScaleY = 96.0f / dpiY; - size->cy = ROUND_TO_INT(size->cy * invScaleY); - } -} - /* * Class: sun_awt_windows_ThemeReader * Method: getPartSize @@ -800,7 +784,6 @@ CHECK_NULL_RETURN(dimMID, NULL); } - rescale(&size); jobject dimObj = env->NewObject(dimClassID, dimMID, size.cx, size.cy); if (safe_ExceptionOccurred(env)) { env->ExceptionDescribe(); diff -Nru openjdk-lts-11.0.21+9/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp openjdk-lts-11.0.22+7/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp --- openjdk-lts-11.0.21+9/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -24,7 +24,6 @@ */ #include "awt.h" - #include #include "awt_Component.h" @@ -1394,7 +1393,9 @@ */ RECT outside; RECT inside; - int extraBottomInsets = 0; + + // extra padded border for captioned windows + int extraPaddedBorderInsets = ::GetSystemMetrics(SM_CXPADDEDBORDER); ::GetClientRect(GetHWnd(), &inside); ::GetWindowRect(GetHWnd(), &outside); @@ -1403,12 +1404,13 @@ if (outside.right - outside.left > 0 && outside.bottom - outside.top > 0) { ::MapWindowPoints(GetHWnd(), 0, (LPPOINT)&inside, 2); m_insets.top = inside.top - outside.top; - m_insets.bottom = outside.bottom - inside.bottom + extraBottomInsets; + m_insets.bottom = outside.bottom - inside.bottom; m_insets.left = inside.left - outside.left; m_insets.right = outside.right - inside.right; } else { m_insets.top = -1; } + if (m_insets.left < 0 || m_insets.top < 0 || m_insets.right < 0 || m_insets.bottom < 0) { @@ -1416,20 +1418,11 @@ jobject target = GetTarget(env); if (IsUndecorated() == FALSE) { /* Get outer frame sizes. */ - LONG style = GetStyle(); - if (style & WS_THICKFRAME) { - m_insets.left = m_insets.right = - ::GetSystemMetrics(SM_CXSIZEFRAME); - m_insets.top = m_insets.bottom = - ::GetSystemMetrics(SM_CYSIZEFRAME); - } else { - m_insets.left = m_insets.right = - ::GetSystemMetrics(SM_CXDLGFRAME); - m_insets.top = m_insets.bottom = - ::GetSystemMetrics(SM_CYDLGFRAME); - } - - + // System metrics are same for resizable & non-resizable frame. + m_insets.left = m_insets.right = + ::GetSystemMetrics(SM_CXFRAME) + extraPaddedBorderInsets; + m_insets.top = m_insets.bottom = + ::GetSystemMetrics(SM_CYFRAME) + extraPaddedBorderInsets; /* Add in title. */ m_insets.top += ::GetSystemMetrics(SM_CYCAPTION); } @@ -1437,7 +1430,7 @@ /* fix for 4418125: Undecorated frames are off by one */ /* undo the -1 set above */ /* Additional fix for 5059656 */ - /* Also, 5089312: Window insets should be 0. */ + /* Also, 5089312: Window insets should be 0. */ ::memset(&m_insets, 0, sizeof(m_insets)); } @@ -1450,7 +1443,6 @@ env->DeleteLocalRef(target); return FALSE; } - m_insets.bottom += extraBottomInsets; env->DeleteLocalRef(target); } diff -Nru openjdk-lts-11.0.21+9/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java openjdk-lts-11.0.22+7/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java --- openjdk-lts-11.0.21+9/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -279,79 +279,80 @@ private Socket createSocket(String host, int port, String socketFactory, int connectTimeout) throws Exception { - Socket socket = null; - - if (socketFactory != null) { + SocketFactory factory = getSocketFactory(socketFactory); + assert factory != null; + Socket socket = createConnectionSocket(host, port, factory, connectTimeout); - // create the factory + // the handshake for SSL connection with server and reset timeout for the socket + if (socket instanceof SSLSocket) { + SSLSocket sslSocket = (SSLSocket)socket; + try { + initialSSLHandshake(sslSocket, connectTimeout); + } catch (Exception e) { + // 8314063 the socket is not closed after the failure of handshake + // close the socket while the error happened + closeOpenedSocket(socket); + throw e; + } + } + return socket; + } + private SocketFactory getSocketFactory(String socketFactoryName) throws Exception { + if (socketFactoryName == null) { + if (debug) { + System.err.println("Connection: using default SocketFactory"); + } + return SocketFactory.getDefault(); + } else { + if (debug) { + System.err.println("Connection: loading supplied SocketFactory: " + socketFactoryName); + } @SuppressWarnings("unchecked") Class socketFactoryClass = - (Class)Obj.helper.loadClass(socketFactory); + (Class) Obj.helper.loadClass(socketFactoryName); Method getDefault = - socketFactoryClass.getMethod("getDefault", new Class[]{}); + socketFactoryClass.getMethod("getDefault"); SocketFactory factory = (SocketFactory) getDefault.invoke(null, new Object[]{}); + return factory; + } + } - // create the socket - - if (connectTimeout > 0) { - - InetSocketAddress endpoint = - createInetSocketAddress(host, port); - - // unconnected socket - socket = factory.createSocket(); - - if (debug) { - System.err.println("Connection: creating socket with " + - "a timeout using supplied socket factory"); - } - - // connected socket - socket.connect(endpoint, connectTimeout); - } - - // continue (but ignore connectTimeout) - if (socket == null) { - if (debug) { - System.err.println("Connection: creating socket using " + - "supplied socket factory"); - } - // connected socket - socket = factory.createSocket(host, port); - } - } else { - - if (connectTimeout > 0) { - - InetSocketAddress endpoint = createInetSocketAddress(host, port); - - socket = new Socket(); + private Socket createConnectionSocket(String host, int port, SocketFactory factory, + int connectTimeout) throws Exception { + Socket socket = null; - if (debug) { - System.err.println("Connection: creating socket with " + - "a timeout"); - } - socket.connect(endpoint, connectTimeout); + if (connectTimeout > 0) { + // create unconnected socket and then connect it if timeout + // is supplied + InetSocketAddress endpoint = + createInetSocketAddress(host, port); + // unconnected socket + socket = factory.createSocket(); + // connect socket with a timeout + socket.connect(endpoint, connectTimeout); + if (debug) { + System.err.println("Connection: creating socket with " + + "a connect timeout"); } - - // continue (but ignore connectTimeout) - - if (socket == null) { - if (debug) { - System.err.println("Connection: creating socket"); - } - // connected socket - socket = new Socket(host, port); + } + if (socket == null) { + // create connected socket + socket = factory.createSocket(host, port); + if (debug) { + System.err.println("Connection: creating connected socket with" + + " no connect timeout"); } } + return socket; + } + + // For LDAP connect timeouts on LDAP over SSL connections must treat + // the SSL handshake following socket connection as part of the timeout. + // So explicitly set a socket read timeout, trigger the SSL handshake, + // then reset the timeout. + private void initialSSLHandshake(SSLSocket sslSocket , int connectTimeout) throws Exception { - // For LDAP connect timeouts on LDAP over SSL connections must treat - // the SSL handshake following socket connection as part of the timeout. - // So explicitly set a socket read timeout, trigger the SSL handshake, - // then reset the timeout. - if (socket instanceof SSLSocket) { - SSLSocket sslSocket = (SSLSocket) socket; if (!IS_HOSTNAME_VERIFICATION_DISABLED) { SSLParameters param = sslSocket.getSSLParameters(); param.setEndpointIdentificationAlgorithm("LDAPS"); @@ -364,8 +365,6 @@ sslSocket.startHandshake(); sslSocket.setSoTimeout(socketTimeout); } - } - return socket; } //////////////////////////////////////////////////////////////////////////// @@ -638,14 +637,12 @@ ldapUnbind(reqCtls); } } finally { - try { - outStream.flush(); - sock.close(); - unpauseReader(); - } catch (IOException ie) { - if (debug) - System.err.println("Connection: problem closing socket: " + ie); - } + + flushAndCloseOutputStream(); + // 8313657 socket is not closed until GC is run + closeOpenedSocket(sock); + tryUnpauseReader(); + if (!notifyParent) { LdapRequest ldr = pendingRequests; while (ldr != null) { @@ -679,6 +676,44 @@ } } + // flush and close output stream + private void flushAndCloseOutputStream() { + try { + outStream.flush(); + } catch (IOException ioEx) { + if (debug) + System.err.println("Connection.flushOutputStream: OutputStream flush problem " + ioEx); + } + try { + outStream.close(); + } catch (IOException ioEx) { + if (debug) + System.err.println("Connection.closeOutputStream: OutputStream close problem " + ioEx); + } + } + + // close socket + private void closeOpenedSocket(Socket socket) { + try { + if (socket != null && !socket.isClosed()) + socket.close(); + } catch (IOException ioEx) { + if (debug) { + System.err.println("Connection.closeConnectionSocket: Socket close problem: " + ioEx); + System.err.println("Socket isClosed: " + sock.isClosed()); + } + } + } + + // unpause reader + private void tryUnpauseReader() { + try { + unpauseReader(); + } catch (IOException ioEx) { + if (debug) + System.err.println("Connection.tryUnpauseReader: unpauseReader problem " + ioEx); + } + } // Assume everything is "quiet" // "synchronize" might lead to deadlock so don't synchronize method diff -Nru openjdk-lts-11.0.21+9/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java openjdk-lts-11.0.22+7/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java --- openjdk-lts-11.0.21+9/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java 2024-01-09 21:19:49.000000000 +0000 @@ -775,9 +775,13 @@ } catch (IllegalArgumentException e) { continue; } - } else { + } else if (nameObject instanceof String) { issuerName = (String)nameObject; + } else { + throw new CertStoreException( + "unrecognized issuerName: must be String or byte[]"); } + // If all we want is CA certs, try to get the (probably shorter) ARL Collection entryCRLs = Collections.emptySet(); if (certChecking == null || certChecking.getBasicConstraints() != -1) { diff -Nru openjdk-lts-11.0.21+9/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java openjdk-lts-11.0.22+7/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java --- openjdk-lts-11.0.21+9/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java 2024-01-09 21:19:49.000000000 +0000 @@ -275,7 +275,6 @@ throw new XMLSignatureException(e); } LOG.debug("Signature provider: {}", signature.getProvider()); - LOG.debug("Signing with key: {}", key); LOG.debug("JCA Algorithm: {}", getJCAAlgorithm()); try (SignerOutputStream outputStream = new SignerOutputStream(signature)) { diff -Nru openjdk-lts-11.0.21+9/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java openjdk-lts-11.0.22+7/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java --- openjdk-lts-11.0.21+9/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2024-01-09 21:19:49.000000000 +0000 @@ -334,7 +334,6 @@ } signature.initSign((PrivateKey)key); LOG.debug("Signature provider: {}", signature.getProvider()); - LOG.debug("Signing with key: {}", key); LOG.debug("JCA Algorithm: {}", getJCAAlgorithm()); try (SignerOutputStream outputStream = new SignerOutputStream(signature)) { diff -Nru openjdk-lts-11.0.21+9/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java openjdk-lts-11.0.22+7/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java --- openjdk-lts-11.0.21+9/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java 2024-01-09 21:19:49.000000000 +0000 @@ -355,7 +355,7 @@ String readErrorMessage(InputStream in) throws IOException { String s; StringBuilder message = new StringBuilder(); - BufferedReader br = new BufferedReader(new InputStreamReader(in)); + BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8")); while ((s = br.readLine()) != null) { message.append(s); } diff -Nru openjdk-lts-11.0.21+9/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java openjdk-lts-11.0.22+7/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java --- openjdk-lts-11.0.21+9/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java 2024-01-09 21:19:49.000000000 +0000 @@ -337,6 +337,17 @@ if (roots.length() == inferencevars.length()) { return this; } + /* if any of the inference vars is a captured variable bail out, this is because + * we could end up generating more than necessary captured variables in an outer + * inference context and then when we need to propagate back to an inner inference + * context that has been minimized it could be that some bounds constraints doesn't + * hold like subtyping constraints between bonds etc. + */ + for (Type iv : inferencevars) { + if (iv.hasTag(TypeTag.TYPEVAR) && ((TypeVar)iv).isCaptured()) { + return this; + } + } ReachabilityVisitor rv = new ReachabilityVisitor(); rv.scan(roots); if (rv.min.size() == inferencevars.length()) { diff -Nru openjdk-lts-11.0.21+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java openjdk-lts-11.0.22+7/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java --- openjdk-lts-11.0.21+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2023, 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 @@ -766,9 +766,12 @@ int len = (p11Key.length() + 7) >> 3; RSAPadding padding = RSAPadding.getInstance (RSAPadding.PAD_BLOCKTYPE_1, len); - byte[] padded = padding.pad(data); - return padded; - } catch (GeneralSecurityException e) { + byte[] result = padding.pad(data); + if (result == null) { + throw new ProviderException("Error padding data"); + } + return result; + } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { throw new ProviderException(e); } } diff -Nru openjdk-lts-11.0.21+9/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/CRSACipher.java openjdk-lts-11.0.22+7/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/CRSACipher.java --- openjdk-lts-11.0.21+9/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/CRSACipher.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/CRSACipher.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023, 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 @@ -30,6 +30,7 @@ import java.security.Key; import java.security.interfaces.*; import java.security.spec.*; +import java.util.Arrays; import javax.crypto.*; import javax.crypto.spec.*; @@ -61,6 +62,9 @@ */ public final class CRSACipher extends CipherSpi { + private static final int ERROR_INVALID_PARAMETER = 0x57; + private static final int NTE_INVALID_PARAMETER = 0x80090027; + // constant for an empty byte array private final static byte[] B0 = new byte[0]; @@ -101,6 +105,8 @@ // cipher parameter for TLS RSA premaster secret private AlgorithmParameterSpec spec = null; + private boolean forTlsPremasterSecret = false; + // the source of randomness private SecureRandom random; @@ -171,6 +177,9 @@ } spec = params; this.random = random; // for TLS RSA premaster secret + this.forTlsPremasterSecret = true; + } else { + this.forTlsPremasterSecret = false; } init(opmode, key); } @@ -277,8 +286,7 @@ } // internal doFinal() method. Here we perform the actual RSA operation - private byte[] doFinal() throws BadPaddingException, - IllegalBlockSizeException { + private byte[] doFinal() throws IllegalBlockSizeException { if (bufOfs > buffer.length) { throw new IllegalBlockSizeException("Data must not be longer " + "than " + (buffer.length - paddingLength) + " bytes"); @@ -307,7 +315,7 @@ throw new AssertionError("Internal error"); } - } catch (KeyException e) { + } catch (KeyException | BadPaddingException e) { throw new ProviderException(e); } finally { @@ -330,14 +338,14 @@ // see JCE spec protected byte[] engineDoFinal(byte[] in, int inOfs, int inLen) - throws BadPaddingException, IllegalBlockSizeException { + throws IllegalBlockSizeException { update(in, inOfs, inLen); return doFinal(); } // see JCE spec protected int engineDoFinal(byte[] in, int inOfs, int inLen, byte[] out, - int outOfs) throws ShortBufferException, BadPaddingException, + int outOfs) throws ShortBufferException, IllegalBlockSizeException { if (outputSize > out.length - outOfs) { throw new ShortBufferException @@ -353,6 +361,7 @@ // see JCE spec protected byte[] engineWrap(Key key) throws InvalidKeyException, IllegalBlockSizeException { + byte[] encoded = key.getEncoded(); // TODO - unextractable key if ((encoded == null) || (encoded.length == 0)) { throw new InvalidKeyException("Could not obtain encoded key"); @@ -361,12 +370,7 @@ throw new InvalidKeyException("Key is too long for wrapping"); } update(encoded, 0, encoded.length); - try { - return doFinal(); - } catch (BadPaddingException e) { - // should not occur - throw new InvalidKeyException("Wrapping failed", e); - } + return doFinal(); } // see JCE spec @@ -387,31 +391,31 @@ update(wrappedKey, 0, wrappedKey.length); try { encoded = doFinal(); - } catch (BadPaddingException e) { - if (isTlsRsaPremasterSecret) { - failover = e; - } else { - throw new InvalidKeyException("Unwrapping failed", e); - } } catch (IllegalBlockSizeException e) { // should not occur, handled with length check above throw new InvalidKeyException("Unwrapping failed", e); } - if (isTlsRsaPremasterSecret) { - if (!(spec instanceof TlsRsaPremasterSecretParameterSpec)) { - throw new IllegalStateException( - "No TlsRsaPremasterSecretParameterSpec specified"); + try { + if (isTlsRsaPremasterSecret) { + if (!forTlsPremasterSecret) { + throw new IllegalStateException( + "No TlsRsaPremasterSecretParameterSpec specified"); + } + + // polish the TLS premaster secret + encoded = KeyUtil.checkTlsPreMasterSecretKey( + ((TlsRsaPremasterSecretParameterSpec) spec).getClientVersion(), + ((TlsRsaPremasterSecretParameterSpec) spec).getServerVersion(), + random, encoded, encoded == null); } - // polish the TLS premaster secret - encoded = KeyUtil.checkTlsPreMasterSecretKey( - ((TlsRsaPremasterSecretParameterSpec)spec).getClientVersion(), - ((TlsRsaPremasterSecretParameterSpec)spec).getServerVersion(), - random, encoded, (failover != null)); + return constructKey(encoded, algorithm, type); + } finally { + if (encoded != null) { + Arrays.fill(encoded, (byte) 0); + } } - - return constructKey(encoded, algorithm, type); } // see JCE spec @@ -495,7 +499,23 @@ * Encrypt/decrypt a data buffer using Microsoft Crypto API with HCRYPTKEY. * It expects and returns ciphertext data in big-endian form. */ - private native static byte[] encryptDecrypt(byte[] data, int dataSize, - long hCryptKey, boolean doEncrypt) throws KeyException; + private byte[] encryptDecrypt(byte[] data, int dataSize, + long hCryptKey, boolean doEncrypt) throws KeyException, BadPaddingException { + int[] returnStatus = new int[1]; + byte[] result= encryptDecrypt(returnStatus, data, dataSize, hCryptKey, doEncrypt); + if ((returnStatus[0] == ERROR_INVALID_PARAMETER) || (returnStatus[0] == NTE_INVALID_PARAMETER)) { + if (forTlsPremasterSecret) { + result = null; + } else { + throw new BadPaddingException("Error " + returnStatus[0] + " returned by MSCAPI"); + } + } else if (returnStatus[0] != 0) { + throw new KeyException("Error " + returnStatus[0] + " returned by MSCAPI"); + } + + return result; + } + private static native byte[] encryptDecrypt(int[] returnStatus, byte[] data, int dataSize, + long key, boolean doEncrypt) throws KeyException; } diff -Nru openjdk-lts-11.0.21+9/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp openjdk-lts-11.0.22+7/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp --- openjdk-lts-11.0.21+9/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp 2024-01-09 21:19:49.000000000 +0000 @@ -502,7 +502,11 @@ else { if (bCallerFreeProv == TRUE) { - ::CryptReleaseContext(hCryptProv, NULL); // deprecated + if ((dwKeySpec & CERT_NCRYPT_KEY_SPEC) == CERT_NCRYPT_KEY_SPEC) { + NCryptFreeObject(hCryptProv); + } else { + ::CryptReleaseContext(hCryptProv, NULL); // deprecated + } bCallerFreeProv = FALSE; } @@ -1865,18 +1869,25 @@ /* * Class: sun_security_mscapi_CRSACipher * Method: encryptDecrypt - * Signature: ([BIJZ)[B + * Signature: ([I[BIJZ)[B */ JNIEXPORT jbyteArray JNICALL Java_sun_security_mscapi_CRSACipher_encryptDecrypt - (JNIEnv *env, jclass clazz, jbyteArray jData, jint jDataSize, jlong hKey, + (JNIEnv *env, jclass clazz, jintArray jResultStatus, jbyteArray jData, jint jDataSize, jlong hKey, jboolean doEncrypt) { jbyteArray result = NULL; jbyte* pData = NULL; + jbyte* resultData = NULL; DWORD dwDataLen = jDataSize; DWORD dwBufLen = env->GetArrayLength(jData); DWORD i; BYTE tmp; + BOOL success; + DWORD ss = ERROR_SUCCESS; + DWORD lastError = ERROR_SUCCESS; + DWORD resultLen = 0; + DWORD pmsLen = 48; + jbyte pmsArr[48] = {0}; __try { @@ -1903,6 +1914,8 @@ pData[i] = pData[dwBufLen - i -1]; pData[dwBufLen - i - 1] = tmp; } + resultData = pData; + resultLen = dwBufLen; } else { // convert to little-endian for (i = 0; i < dwBufLen / 2; i++) { @@ -1912,21 +1925,28 @@ } // decrypt - if (! ::CryptDecrypt((HCRYPTKEY) hKey, 0, TRUE, 0, (BYTE *)pData, //deprecated - &dwBufLen)) { - - ThrowException(env, KEY_EXCEPTION, GetLastError()); - __leave; + success = ::CryptDecrypt((HCRYPTKEY) hKey, 0, TRUE, 0, (BYTE *)pData, //deprecated + &dwBufLen); + lastError = GetLastError(); + if (success) { + ss = ERROR_SUCCESS; + resultData = pData; + resultLen = dwBufLen; + } else { + ss = lastError; + resultData = pmsArr; + resultLen = pmsLen; } + env->SetIntArrayRegion(jResultStatus, 0, 1, (jint*) &ss); } - // Create new byte array - if ((result = env->NewByteArray(dwBufLen)) == NULL) { + // Create new byte array + if ((result = env->NewByteArray(resultLen)) == NULL) { __leave; } // Copy data from native buffer to Java buffer - env->SetByteArrayRegion(result, 0, dwBufLen, (jbyte*) pData); + env->SetByteArrayRegion(result, 0, resultLen, (jbyte*) resultData); } __finally { diff -Nru openjdk-lts-11.0.21+9/src/jdk.internal.le/share/legal/jline.md openjdk-lts-11.0.22+7/src/jdk.internal.le/share/legal/jline.md --- openjdk-lts-11.0.21+9/src/jdk.internal.le/share/legal/jline.md 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.internal.le/share/legal/jline.md 2024-01-09 21:19:49.000000000 +0000 @@ -38,257 +38,4 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -4th Party Dependency -============= -org.fusesource.jansi version 2.4.0 -org.apache.sshd 2.9.2 -org.apache.felix.gogo.runtime 1.1.6 -org.apache.felix.gogo.jline 1.1.8 -============= -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -============= -juniversalchardet - -The library is subject to the Mozilla Public License Version 1.1. - -Alternatively, the library may be used under the terms of either the GNU General Public License Version 2 or later, or the GNU Lesser General Public License 2.1 or later. - -================ - -slf4j - -SLF4J source code and binaries are distributed under the MIT license. - - -Copyright (c) 2004-2023 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -These terms are identical to those of the MIT License, also called the X License -or the X11 License, which is a simple, permissive non-copyleft free software license. -It is deemed compatible with virtually all types of licenses, commercial or otherwise. -In particular, the Free Software Foundation has declared it compatible with GNU GPL. -It is also known to be approved by the Apache Software Foundation as compatible with -Apache Software License. - diff -Nru openjdk-lts-11.0.21+9/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java openjdk-lts-11.0.22+7/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java --- openjdk-lts-11.0.21+9/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2021, 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 @@ -474,11 +474,10 @@ // printDirect() } } catch (IOException ex) { - String s = ex.getMessage(); - if (!s.startsWith("Bad file number")) { + if (!ex.getMessage().equalsIgnoreCase("stream closed")) { throw ex; } - // else we got a Bad file number IOException which just means + // else we got a "Stream closed" IOException which just means // that the debuggee has gone away. We'll just treat it the // same as if we got an EOF. } diff -Nru openjdk-lts-11.0.21+9/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c openjdk-lts-11.0.22+7/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c --- openjdk-lts-11.0.21+9/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c 2024-01-09 21:19:49.000000000 +0000 @@ -103,7 +103,7 @@ static void JNICALL cbEarlyException(jvmtiEnv*, JNIEnv *, jthread, jmethodID, jlocation, jobject, jmethodID, jlocation); -static void initialize(JNIEnv *env, jthread thread, EventIndex triggering_ei); +static void initialize(JNIEnv *env, jthread thread, EventIndex triggering_ei, EventInfo *opt_info); static jboolean parseOptions(char *str); /* @@ -439,7 +439,7 @@ EXIT_ERROR(AGENT_ERROR_INTERNAL,"VM dead at VM_INIT time"); } if (initOnStartup) - initialize(env, thread, EI_VM_INIT); + initialize(env, thread, EI_VM_INIT, NULL); vmInitialized = JNI_TRUE; LOG_MISC(("END cbEarlyVMInit")); } @@ -492,6 +492,16 @@ LOG_MISC(("VM is not initialized yet")); return; } + EventInfo info; + info.ei = EI_EXCEPTION; + info.thread = thread; + info.clazz = getMethodClass(jvmti_env, method); + info.method = method; + info.location = location; + info.object = exception; + info.u.exception.catch_clazz = getMethodClass(jvmti_env, catch_method); + info.u.exception.catch_method = catch_method; + info.u.exception.catch_location = catch_location; /* * We want to preserve any current exception that might get wiped @@ -506,24 +516,22 @@ if (initOnUncaught && catch_method == NULL) { LOG_MISC(("Initializing on uncaught exception")); - initialize(env, thread, EI_EXCEPTION); + initialize(env, thread, EI_EXCEPTION, &info); } else if (initOnException != NULL) { - jclass clazz; - - /* Get class of exception thrown */ - clazz = JNI_FUNC_PTR(env,GetObjectClass)(env, exception); - if ( clazz != NULL ) { + jclass exception_clazz = JNI_FUNC_PTR(env, GetObjectClass)(env, exception); + /* check class of exception thrown */ + if ( exception_clazz != NULL ) { char *signature = NULL; /* initing on throw, check */ - error = classSignature(clazz, &signature, NULL); + error = classSignature(exception_clazz, &signature, NULL); LOG_MISC(("Checking specific exception: looking for %s, got %s", initOnException, signature)); if ( (error==JVMTI_ERROR_NONE) && (strcmp(signature, initOnException) == 0)) { LOG_MISC(("Initializing on specific exception")); - initialize(env, thread, EI_EXCEPTION); + initialize(env, thread, EI_EXCEPTION, &info); } else { error = AGENT_ERROR_INTERNAL; /* Just to cause restore */ } @@ -664,9 +672,11 @@ /* * Initialize debugger back end modules + * + * @param opt_info optional event info to use, might be null */ static void -initialize(JNIEnv *env, jthread thread, EventIndex triggering_ei) +initialize(JNIEnv *env, jthread thread, EventIndex triggering_ei, EventInfo *opt_info) { jvmtiError error; EnumerateArg arg; @@ -754,13 +764,13 @@ * can get in the queue (from other not-yet-suspended threads) * before this one does. (Also need to handle allocation error below?) */ - EventInfo info; struct bag *initEventBag; - LOG_MISC(("triggering_ei != EI_VM_INIT")); + LOG_MISC(("triggering_ei == EI_EXCEPTION")); + JDI_ASSERT(triggering_ei == EI_EXCEPTION); + JDI_ASSERT(opt_info != NULL); initEventBag = eventHelper_createEventBag(); - (void)memset(&info,0,sizeof(info)); - info.ei = triggering_ei; - eventHelper_recordEvent(&info, 0, suspendPolicy, initEventBag); + threadControl_onEventHandlerEntry(currentSessionID, opt_info->ei, thread, NULL); + eventHelper_recordEvent(opt_info, 0, suspendPolicy, initEventBag); (void)eventHelper_reportEvents(currentSessionID, initEventBag); bagDestroyBag(initEventBag); } @@ -1395,7 +1405,7 @@ if (!startedViaJcmd) { startedViaJcmd = JNI_TRUE; is_first_start = JNI_TRUE; - initialize(env, thread, EI_VM_INIT); + initialize(env, thread, EI_VM_INIT, NULL); } bagEnumerateOver(transports, getFirstTransport, &spec); diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.jfr.events; + +import jdk.jfr.Category; +import jdk.jfr.Description; +import jdk.jfr.Label; +import jdk.jfr.Name; +import jdk.jfr.internal.MirrorEvent; + +@Category({"Java Development Kit", "Security"}) +@Label("Security Provider Instance Request") +@Name("jdk.SecurityProviderService") +@Description("Details of Provider.getInstance(String type, String algorithm) calls") +@MirrorEvent(className = "jdk.internal.event.SecurityProviderServiceEvent") +public final class SecurityProviderServiceEvent extends AbstractJDKEvent { + @Label("Type of Service") + public String type; + + @Label("Algorithm Name") + public String algorithm; + + @Label("Security Provider") + public String provider; +} diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java 2024-01-09 21:19:49.000000000 +0000 @@ -38,11 +38,17 @@ public final class JVM { private static final JVM jvm = new JVM(); - // JVM signals file changes by doing Object#notifu on this object - static final Object FILE_DELTA_CHANGE = new Object(); - static final long RESERVED_CLASS_ID_LIMIT = 400; + private static class ChunkRotationMonitor {} + + /* + * The JVM uses the chunk rotation monitor to notify Java that a rotation is warranted. + * The monitor type is used to exclude jdk.JavaMonitorWait events from being generated + * when Object.wait() is called on this monitor. + */ + static final Object CHUNK_ROTATION_MONITOR = new ChunkRotationMonitor(); + private volatile boolean recording; private volatile boolean nativeOK; diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java 2024-01-09 21:19:49.000000000 +0000 @@ -444,8 +444,8 @@ private void takeNap(long duration) { try { - synchronized (JVM.FILE_DELTA_CHANGE) { - JVM.FILE_DELTA_CHANGE.wait(duration < 10 ? 10 : duration); + synchronized (JVM.CHUNK_ROTATION_MONITOR) { + JVM.CHUNK_ROTATION_MONITOR.wait(duration < 10 ? 10 : duration); } } catch (InterruptedException e) { e.printStackTrace(); diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java 2024-01-09 21:19:49.000000000 +0000 @@ -59,6 +59,7 @@ */ public String execute ( + boolean verbose, String repositoryPath, String dumpPath, Integer stackDepth, @@ -92,66 +93,86 @@ } catch (Exception e) { throw new DCmdException("Could not use " + repositoryPath + " as repository. " + e.getMessage(), e); } - printRepositoryPath(); + if (verbose) { + printRepositoryPath(); + } updated = true; } if (dumpPath != null) { Options.setDumpPath(new SafePath(dumpPath)); Logger.log(LogTag.JFR, LogLevel.INFO, "Emergency dump path set to " + dumpPath); - printDumpPath(); + if (verbose) { + printDumpPath(); + } updated = true; } if (stackDepth != null) { Options.setStackDepth(stackDepth); Logger.log(LogTag.JFR, LogLevel.INFO, "Stack depth set to " + stackDepth); - printStackDepth(); + if (verbose) { + printStackDepth(); + } updated = true; } if (globalBufferCount != null) { Options.setGlobalBufferCount(globalBufferCount); Logger.log(LogTag.JFR, LogLevel.INFO, "Global buffer count set to " + globalBufferCount); - printGlobalBufferCount(); + if (verbose) { + printGlobalBufferCount(); + } updated = true; } if (globalBufferSize != null) { Options.setGlobalBufferSize(globalBufferSize); Logger.log(LogTag.JFR, LogLevel.INFO, "Global buffer size set to " + globalBufferSize); - printGlobalBufferSize(); + if (verbose) { + printGlobalBufferSize(); + } updated = true; } if (threadBufferSize != null) { Options.setThreadBufferSize(threadBufferSize); Logger.log(LogTag.JFR, LogLevel.INFO, "Thread buffer size set to " + threadBufferSize); - printThreadBufferSize(); + if (verbose) { + printThreadBufferSize(); + } updated = true; } if (memorySize != null) { Options.setMemorySize(memorySize); Logger.log(LogTag.JFR, LogLevel.INFO, "Memory size set to " + memorySize); - printMemorySize(); + if (verbose) { + printMemorySize(); + } updated = true; } if (maxChunkSize != null) { Options.setMaxChunkSize(maxChunkSize); Logger.log(LogTag.JFR, LogLevel.INFO, "Max chunk size set to " + maxChunkSize); - printMaxChunkSize(); + if (verbose) { + printMaxChunkSize(); + } updated = true; } if (sampleThreads != null) { Options.setSampleThreads(sampleThreads); Logger.log(LogTag.JFR, LogLevel.INFO, "Sample threads set to " + sampleThreads); - printSampleThreads(); + if (verbose) { + printSampleThreads(); + } updated = true; } - + if (!verbose) { + return ""; + } if (!updated) { println("Current configuration:"); println(); diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java 2024-01-09 21:19:49.000000000 +0000 @@ -39,6 +39,7 @@ import jdk.jfr.events.FileWriteEvent; import jdk.jfr.events.DeserializationEvent; import jdk.jfr.events.SecurityPropertyModificationEvent; +import jdk.jfr.events.SecurityProviderServiceEvent; import jdk.jfr.events.SocketReadEvent; import jdk.jfr.events.SocketWriteEvent; import jdk.jfr.events.TLSHandshakeEvent; @@ -57,6 +58,7 @@ private static final Class[] mirrorEventClasses = { DeserializationEvent.class, SecurityPropertyModificationEvent.class, + SecurityProviderServiceEvent.class, TLSHandshakeEvent.class, X509CertificateEvent.class, X509ValidationEvent.class @@ -75,6 +77,7 @@ ActiveRecordingEvent.class, jdk.internal.event.DeserializationEvent.class, jdk.internal.event.SecurityPropertyModificationEvent.class, + jdk.internal.event.SecurityProviderServiceEvent.class, jdk.internal.event.TLSHandshakeEvent.class, jdk.internal.event.X509CertificateEvent.class, jdk.internal.event.X509ValidationEvent.class diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/conf/jfr/default.jfc openjdk-lts-11.0.22+7/src/jdk.jfr/share/conf/jfr/default.jfc --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/conf/jfr/default.jfc 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/conf/jfr/default.jfc 2024-01-09 21:19:49.000000000 +0000 @@ -613,6 +613,11 @@ true + + false + true + + false true diff -Nru openjdk-lts-11.0.21+9/src/jdk.jfr/share/conf/jfr/profile.jfc openjdk-lts-11.0.22+7/src/jdk.jfr/share/conf/jfr/profile.jfc --- openjdk-lts-11.0.21+9/src/jdk.jfr/share/conf/jfr/profile.jfc 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.jfr/share/conf/jfr/profile.jfc 2024-01-09 21:19:49.000000000 +0000 @@ -613,6 +613,11 @@ true + + false + true + + false true diff -Nru openjdk-lts-11.0.21+9/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java openjdk-lts-11.0.22+7/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java --- openjdk-lts-11.0.21+9/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java 2024-01-09 21:19:49.000000000 +0000 @@ -1604,9 +1604,11 @@ if ("context".equals(nameStr)) { return sctxt; } else if ("engine".equals(nameStr)) { - // expose "engine" variable only when there is no security manager - // or when no class filter is set. - if (System.getSecurityManager() == null || global.getClassFilter() == null) { + // expose "engine" variable only when there is no security manager, + // or when no class filter is set and --no-java is not set + if (System.getSecurityManager() == null || + (global.getClassFilter() == null && + !global.getContext().getEnv()._no_java)) { return global.engine; } } diff -Nru openjdk-lts-11.0.21+9/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java openjdk-lts-11.0.22+7/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java --- openjdk-lts-11.0.21+9/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java 2024-01-09 21:19:49.000000000 +0000 @@ -29,7 +29,7 @@ * *

The {@code HandlerResult} is used to determine the behavior of the * channel after it handles a notification from the SCTP stack. Essentially its - * value determines if the channel should try to receive another notificaiton or + * value determines if the channel should try to receive another notification or * a message before returning. * * @since 1.7 diff -Nru openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java --- openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java 2024-01-09 21:19:49.000000000 +0000 @@ -53,6 +53,7 @@ import com.sun.nio.sctp.NotificationHandler; import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpSocketOption; +import sun.net.util.IPAddressUtil; import sun.nio.ch.DirectBuffer; import sun.nio.ch.IOStatus; import sun.nio.ch.IOUtil; @@ -1033,6 +1034,9 @@ if (target != null) { InetSocketAddress isa = Net.checkAddress(target); addr = isa.getAddress(); + if (addr.isLinkLocalAddress()) { + addr = IPAddressUtil.toScopedAddress(addr); + } port = isa.getPort(); } diff -Nru openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java --- openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java 2024-01-09 21:19:49.000000000 +0000 @@ -53,6 +53,7 @@ import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpMultiChannel; import com.sun.nio.sctp.SctpSocketOption; +import sun.net.util.IPAddressUtil; import sun.nio.ch.DirectBuffer; import sun.nio.ch.NativeThread; import sun.nio.ch.IOStatus; @@ -892,6 +893,9 @@ if (target != null) { InetSocketAddress isa = Net.checkAddress(target); addr = isa.getAddress(); + if (addr.isLinkLocalAddress()) { + addr = IPAddressUtil.toScopedAddress(addr); + } port = isa.getPort(); } int pos = bb.position(); diff -Nru openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java --- openjdk-lts-11.0.21+9/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java 2024-01-09 21:19:49.000000000 +0000 @@ -34,6 +34,7 @@ import java.util.HashSet; import java.security.AccessController; import java.security.PrivilegedAction; +import sun.net.util.IPAddressUtil; import sun.nio.ch.IOUtil; import sun.nio.ch.Net; import com.sun.nio.sctp.SctpSocketOption; @@ -169,9 +170,13 @@ InetSocketAddress netAddr = (InetSocketAddress)addr; if (name.equals(SCTP_PRIMARY_ADDR)) { + InetAddress inetAddress = netAddr.getAddress(); + if (inetAddress.isLinkLocalAddress()) { + inetAddress = IPAddressUtil.toScopedAddress(inetAddress); + } setPrimAddrOption0(fd, assocId, - netAddr.getAddress(), + inetAddress, netAddr.getPort()); } else { setPeerPrimAddrOption0(fd, diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/applications/scimark/Scimark.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/applications/scimark/Scimark.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/applications/scimark/Scimark.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/applications/scimark/Scimark.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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 @@ -24,7 +24,6 @@ /* * @test * @library /test/lib - * @requires vm.flagless * @run driver Scimark */ @@ -47,7 +46,9 @@ + Scimark.class.getName(), e); } - OutputAnalyzer output = new OutputAnalyzer(ProcessTools.createJavaProcessBuilder( + System.setProperty("test.noclasspath", "true"); + + OutputAnalyzer output = new OutputAnalyzer(ProcessTools.createTestJvm( "-cp", artifacts.get("gov.nist.math.scimark-2.0").toString(), "jnt.scimark2.commandline", "-large") .start()); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/compilercontrol/parser/TestCompileOnly.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/compilercontrol/parser/TestCompileOnly.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/compilercontrol/parser/TestCompileOnly.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/compilercontrol/parser/TestCompileOnly.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8312573 + * @summary Test -XX:CompileOnly= with invalid arguments + * @library /test/lib / + * @run driver compiler.compilercontrol.parser.TestCompileOnly + */ + +package compiler.compilercontrol.parser; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class TestCompileOnly { + + public static void main(String[] args) throws Exception { + test(","); + test(" "); + test(", "); + test(" ,"); + test(",,"); + test(" "); + } + + public static void test(String compileOnlyCommand) throws Exception { + OutputAnalyzer output = ProcessTools.executeTestJvm("-XX:CompileOnly=" + compileOnlyCommand, "-version"); + output.shouldHaveExitValue(0); + } +} diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/locks/TestUnlockOSR.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/locks/TestUnlockOSR.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/locks/TestUnlockOSR.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/locks/TestUnlockOSR.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2023 SAP SE. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @bug 8316746 + * @summary During OSR, locks get transferred from interpreter frame. + * Check that unlocking 2 such locks works in the OSR compiled nmethod. + * Some platforms verify that the unlocking happens in the corrent order. + * + * @run main/othervm -Xbatch TestUnlockOSR + */ + +public class TestUnlockOSR { + static void test_method(Object a, Object b, int limit) { + synchronized(a) { // allocate space for monitors + synchronized(b) { + } + } // free space to test allocation in reused space + synchronized(a) { // reuse the space + synchronized(b) { + for (int i = 0; i < limit; i++) {} + } + } + } + + public static void main(String[] args) { + Object a = new TestUnlockOSR(), + b = new TestUnlockOSR(); + // avoid uncommon trap before last unlocks + for (int i = 0; i < 100; i++) { test_method(a, b, 0); } + // trigger OSR + test_method(a, b, 100000); + } +} diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/parsing/MissingSafepointOnTryCatch.jasm openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/parsing/MissingSafepointOnTryCatch.jasm --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/parsing/MissingSafepointOnTryCatch.jasm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/parsing/MissingSafepointOnTryCatch.jasm 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class MissingSafepointOnTryCatch version 52:0 { + + static Method m:"()V" { + return; + } + + static Method test1:"()V" stack 1 { + try t; + invokestatic m:"()V"; + return; + + catch t java/lang/Throwable; + stack_map class java/lang/Throwable; + athrow; + endtry t; + } + + static Method test2:"()V" stack 1 { + try t0; + try t1; + invokestatic m:"()V"; + endtry t1; + return; + + catch t1 java/lang/Exception; + stack_map class java/lang/Exception; + return; + + catch t0 java/lang/Throwable; + stack_map class java/lang/Throwable; + athrow; + endtry t0; + } + + public static Method th:"()V" + throws java/lang/Exception + stack 2 locals 0 + { + new class java/lang/Exception; + dup; + invokespecial Method java/lang/Exception."":"()V"; + athrow; + } + + static Method test3:"()V" stack 1 locals 2 { + try t; + invokestatic m:"()V"; + iconst_1; + istore_0; + iconst_0; + istore_1; + return; + catch t java/lang/Throwable; + stack_map class java/lang/Throwable; + invokestatic th:"()V"; + return; + endtry t; + } + + static Method test4:"()V" stack 2 locals 2 { + try t; + invokestatic m:"()V"; + iconst_1; + istore_0; + iconst_0; + istore_1; + return; + catch t java/lang/Throwable; + stack_map class java/lang/Throwable; + iconst_1; + istore_0; + invokestatic th:"()V"; + return; + endtry t; + } + + static Method testInfinite:"()V" stack 1 { + try t; + invokestatic th:"()V"; + return; + + catch t java/lang/Throwable; + stack_map class java/lang/Throwable; + athrow; + endtry t; + } + +} // end Class MissingSafepointOnTryCatch diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/parsing/TestMissingSafepointOnTryCatch.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/parsing/TestMissingSafepointOnTryCatch.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/parsing/TestMissingSafepointOnTryCatch.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/parsing/TestMissingSafepointOnTryCatch.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8313626 + * @summary assert(false) failed: malformed control flow to missing safepoint on backedge of a try-catch + * @library /test/lib + * @compile MissingSafepointOnTryCatch.jasm + * @run main/othervm -XX:CompileCommand=quiet + * -XX:CompileCommand=compileonly,MissingSafepointOnTryCatch::test* + * -XX:CompileCommand=dontinline,MissingSafepointOnTryCatch::m + * -XX:CompileCommand=inline,MissingSafepointOnTryCatch::th + * -XX:-TieredCompilation -Xcomp TestMissingSafepointOnTryCatch + */ + +import jdk.test.lib.Utils; + +public class TestMissingSafepointOnTryCatch { + + public static void infiniteLoop() { + try { + Thread thread = new Thread() { + public void run() { + MissingSafepointOnTryCatch.testInfinite(); + } + }; + thread.setDaemon(true); + thread.start(); + Thread.sleep(Utils.adjustTimeout(500)); + } catch (Exception e) {} + } + + public static void main(String[] args) { + try { + // to make sure java/lang/Exception class is resolved + MissingSafepointOnTryCatch.th(); + } catch (Exception e) {} + MissingSafepointOnTryCatch.test1(); + MissingSafepointOnTryCatch.test2(); + MissingSafepointOnTryCatch.test3(); + MissingSafepointOnTryCatch.test4(); + infiniteLoop(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestBoolean { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static boolean static_v; boolean v; @@ -211,6 +228,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetBooleanPlain(base, offset, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = UNSAFE.getBoolean(base, offset); @@ -228,6 +246,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetBooleanAcquire(base, offset, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = UNSAFE.getBoolean(base, offset); @@ -245,6 +264,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetBooleanRelease(base, offset, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = UNSAFE.getBoolean(base, offset); @@ -262,6 +282,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetBoolean(base, offset, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = UNSAFE.getBoolean(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestByte { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static byte static_v; byte v; @@ -240,6 +257,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetBytePlain(base, offset, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = UNSAFE.getByte(base, offset); @@ -257,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetByteAcquire(base, offset, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = UNSAFE.getByte(base, offset); @@ -274,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetByteRelease(base, offset, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = UNSAFE.getByte(base, offset); @@ -291,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetByte(base, offset, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = UNSAFE.getByte(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestChar { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static char static_v; char v; @@ -258,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetCharPlain(base, offset, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = UNSAFE.getChar(base, offset); @@ -275,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetCharAcquire(base, offset, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = UNSAFE.getChar(base, offset); @@ -292,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetCharRelease(base, offset, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = UNSAFE.getChar(base, offset); @@ -309,6 +329,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetChar(base, offset, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = UNSAFE.getChar(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestDouble { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static double static_v; double v; @@ -240,6 +257,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetDoublePlain(base, offset, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = UNSAFE.getDouble(base, offset); @@ -257,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetDoubleAcquire(base, offset, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = UNSAFE.getDouble(base, offset); @@ -274,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetDoubleRelease(base, offset, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = UNSAFE.getDouble(base, offset); @@ -291,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetDouble(base, offset, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = UNSAFE.getDouble(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestFloat { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static float static_v; float v; @@ -240,6 +257,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetFloatPlain(base, offset, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = UNSAFE.getFloat(base, offset); @@ -257,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetFloatAcquire(base, offset, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = UNSAFE.getFloat(base, offset); @@ -274,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetFloatRelease(base, offset, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = UNSAFE.getFloat(base, offset); @@ -291,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetFloat(base, offset, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = UNSAFE.getFloat(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestInt { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static int static_v; int v; @@ -258,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetIntPlain(base, offset, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = UNSAFE.getInt(base, offset); @@ -275,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetIntAcquire(base, offset, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = UNSAFE.getInt(base, offset); @@ -292,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetIntRelease(base, offset, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = UNSAFE.getInt(base, offset); @@ -309,6 +329,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetInt(base, offset, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = UNSAFE.getInt(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestLong { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static long static_v; long v; @@ -258,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetLongPlain(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = UNSAFE.getLong(base, offset); @@ -275,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetLongAcquire(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = UNSAFE.getLong(base, offset); @@ -292,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetLongRelease(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = UNSAFE.getLong(base, offset); @@ -309,6 +329,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetLong(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = UNSAFE.getLong(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestObject { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static Object static_v; Object v; @@ -211,6 +228,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetObjectPlain(base, offset, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain Object"); Object x = UNSAFE.getObject(base, offset); @@ -228,6 +246,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetObjectAcquire(base, offset, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire Object"); Object x = UNSAFE.getObject(base, offset); @@ -245,6 +264,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetObjectRelease(base, offset, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease Object"); Object x = UNSAFE.getObject(base, offset); @@ -262,6 +282,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetObject(base, offset, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet Object"); Object x = UNSAFE.getObject(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class JdkInternalMiscUnsafeAccessTestShort { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final jdk.internal.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static short static_v; short v; @@ -258,6 +275,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetShortPlain(base, offset, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = UNSAFE.getShort(base, offset); @@ -275,6 +293,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetShortAcquire(base, offset, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = UNSAFE.getShort(base, offset); @@ -292,6 +311,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetShortRelease(base, offset, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = UNSAFE.getShort(base, offset); @@ -309,6 +329,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSetShort(base, offset, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = UNSAFE.getShort(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestBoolean { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static boolean static_v; boolean v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestByte.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestByte.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestByte.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestByte.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestByte { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static byte static_v; byte v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestChar.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestChar.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestChar.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestChar.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestChar { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static char static_v; char v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestDouble { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static double static_v; double v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestFloat { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static float static_v; float v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestInt.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestInt.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestInt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestInt.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestInt { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static int static_v; int v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestLong.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestLong.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestLong.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestLong.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestLong { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static long static_v; long v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestObject.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestObject.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestObject.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestObject.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestObject { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static Object static_v; Object v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestShort.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestShort.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestShort.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/SunMiscUnsafeAccessTestShort.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,7 +43,14 @@ public class SunMiscUnsafeAccessTestShort { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final sun.misc.Unsafe UNSAFE; @@ -86,6 +93,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static short static_v; short v; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/X-UnsafeAccessTest.java.template openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/X-UnsafeAccessTest.java.template --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/compiler/unsafe/X-UnsafeAccessTest.java.template 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/compiler/unsafe/X-UnsafeAccessTest.java.template 2024-01-09 21:19:49.000000000 +0000 @@ -47,7 +47,14 @@ public class $Qualifier$UnsafeAccessTest$Type$ { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); static final $package$.Unsafe UNSAFE; @@ -90,6 +97,16 @@ ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(ascale); } + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } + static $type$ static_v; $type$ v; @@ -302,6 +319,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSet$Type$Plain(base, offset, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = UNSAFE.get$Type$(base, offset); @@ -319,6 +337,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSet$Type$Acquire(base, offset, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = UNSAFE.get$Type$(base, offset); @@ -336,6 +355,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSet$Type$Release(base, offset, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = UNSAFE.get$Type$(base, offset); @@ -353,6 +373,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = UNSAFE.weakCompareAndSet$Type$(base, offset, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = UNSAFE.get$Type$(base, offset); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestAgeOutput.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestAgeOutput.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestAgeOutput.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestAgeOutput.java 2024-01-09 21:19:49.000000000 +0000 @@ -66,12 +66,9 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import static jdk.test.lib.Asserts.*; - public class TestAgeOutput { public static void checkPattern(String pattern, String what) throws Exception { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestCardTablePageCommits.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestCardTablePageCommits.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestCardTablePageCommits.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestCardTablePageCommits.java 2024-01-09 21:19:49.000000000 +0000 @@ -23,7 +23,6 @@ package gc; -import jdk.test.lib.JDKToolFinder; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.Platform; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java 2024-01-09 21:19:49.000000000 +0000 @@ -24,7 +24,6 @@ package gc; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java 2024-01-09 21:19:49.000000000 +0000 @@ -24,7 +24,6 @@ package gc; import java.util.List; -import java.util.ArrayList; import java.lang.management.*; import static jdk.test.lib.Asserts.*; import java.util.stream.*; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestNoPerfCounter.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestNoPerfCounter.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestNoPerfCounter.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestNoPerfCounter.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test TestNoPerfCounter + * @bug 8210265 + * @requires vm.gc=="null" + * @library /test/lib / + * @summary Tests that disabling perf counters does not crash the VM + * @run main/othervm -XX:-UsePerfData TestNoPerfCounter + */ + +public class TestNoPerfCounter { + public static void main(String[] args) throws Exception { + // Nothing to do + } +} diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestNumWorkerOutput.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestNumWorkerOutput.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestNumWorkerOutput.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestNumWorkerOutput.java 2024-01-09 21:19:49.000000000 +0000 @@ -54,12 +54,9 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import static jdk.test.lib.Asserts.*; - public class TestNumWorkerOutput { public static void checkPatternOnce(String pattern, String what) throws Exception { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestObjectAlignment.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestObjectAlignment.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestObjectAlignment.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestObjectAlignment.java 2024-01-09 21:19:49.000000000 +0000 @@ -44,9 +44,6 @@ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256 */ -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - public class TestObjectAlignment { public static byte[] garbage; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java 2024-01-09 21:19:49.000000000 +0000 @@ -24,7 +24,6 @@ package gc; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/AllocationHelper.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/AllocationHelper.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/AllocationHelper.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/AllocationHelper.java 2024-01-09 21:19:49.000000000 +0000 @@ -23,7 +23,6 @@ package gc.arguments; -import java.util.LinkedList; import java.util.concurrent.Callable; /** diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java 2024-01-09 21:19:49.000000000 +0000 @@ -36,12 +36,9 @@ * @run driver gc.arguments.TestSelectDefaultGC */ -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.util.regex.*; - public class TestSelectDefaultGC { public static void assertVMOption(OutputAnalyzer output, String option, boolean value) { output.shouldMatch(" " + option + " .*=.* " + value + " "); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java 2024-01-09 21:19:49.000000000 +0000 @@ -37,7 +37,6 @@ import java.util.LinkedList; import java.util.Arrays; -import java.util.Collections; import jdk.test.lib.Utils; public class TestShrinkHeapInSteps { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java 2024-01-09 21:19:49.000000000 +0000 @@ -42,8 +42,6 @@ import jdk.test.lib.process.ProcessTools; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; -import java.util.ArrayList; -import java.util.Arrays; import sun.hotspot.WhiteBox; public class TestCMSClassUnloadingEnabledHWM { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java 2024-01-09 21:19:49.000000000 +0000 @@ -40,8 +40,6 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.util.ArrayList; -import java.util.Arrays; import sun.hotspot.WhiteBox; public class TestG1ClassUnloadingHWM { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java 2024-01-09 21:19:49.000000000 +0000 @@ -51,7 +51,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java 2024-01-09 21:19:49.000000000 +0000 @@ -51,8 +51,6 @@ * gc.epsilon.TestArraycopyCheckcast */ -import java.util.Random; - public class TestArraycopyCheckcast { static int COUNT = Integer.getInteger("count", 1000); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java 2024-01-09 21:19:49.000000000 +0000 @@ -35,7 +35,6 @@ * gc.epsilon.TestEpsilonEnabled */ -import jdk.test.lib.Platform; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java 2024-01-09 21:19:49.000000000 +0000 @@ -49,7 +49,6 @@ */ import java.lang.management.*; -import java.util.*; public class TestMemoryMXBeans { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java 2024-01-09 21:19:49.000000000 +0000 @@ -39,12 +39,8 @@ import sun.hotspot.WhiteBox; import java.util.Arrays; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import jdk.test.lib.Asserts; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java 2024-01-09 21:19:49.000000000 +0000 @@ -38,9 +38,6 @@ */ import java.lang.Math; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.Asserts; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestPLABOutput.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestPLABOutput.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestPLABOutput.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestPLABOutput.java 2024-01-09 21:19:49.000000000 +0000 @@ -41,7 +41,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java 2024-01-09 21:19:49.000000000 +0000 @@ -27,13 +27,10 @@ * Common helpers for TestRemsetLogging* tests */ -import com.sun.management.HotSpotDiagnosticMXBean; -import com.sun.management.VMOption; import sun.hotspot.WhiteBox; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.Arrays; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java 2024-01-09 21:19:49.000000000 +0000 @@ -28,7 +28,6 @@ import jdk.test.lib.Utils; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.Utils; import jtreg.SkippedException; import java.io.IOException; @@ -37,7 +36,6 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java 2024-01-09 21:19:49.000000000 +0000 @@ -27,9 +27,7 @@ * Common code for string deduplication tests */ -import java.lang.management.*; import java.lang.reflect.*; -import java.security.*; import java.util.*; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java 2024-01-09 21:19:49.000000000 +0000 @@ -38,7 +38,6 @@ import java.util.Collections; import jdk.test.lib.Asserts; -import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import sun.hotspot.WhiteBox; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java 2024-01-09 21:19:49.000000000 +0000 @@ -42,8 +42,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Collections; - import java.lang.management.*; // 8195115 says that for the "G1 Old Gen" MemoryPool, CollectionUsage.used diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java 2024-01-09 21:19:49.000000000 +0000 @@ -36,10 +36,8 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.List; import java.util.stream.Collectors; public class TestDeprecatedPrintFlags { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/logging/TestPrintReferences.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/logging/TestPrintReferences.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/logging/TestPrintReferences.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/logging/TestPrintReferences.java 2024-01-09 21:19:49.000000000 +0000 @@ -37,8 +37,6 @@ import java.lang.ref.SoftReference; import java.math.BigDecimal; -import java.util.ArrayList; - import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import java.util.regex.Pattern; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,8 +26,6 @@ import java.util.List; import java.lang.management.*; import jdk.test.lib.Platform; -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; import static jdk.test.lib.Asserts.*; /* @test TestMetaspaceMemoryPool diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java 2024-01-09 21:19:49.000000000 +0000 @@ -28,7 +28,6 @@ import jdk.test.lib.Platform; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters; /* @test TestPerfCountersAndMemoryPools diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, 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 @@ -24,7 +24,7 @@ package gc.stress; /* - * @test TestStressIHOPMultiThread + * @test * @bug 8148397 * @key stress * @summary Stress test for IHOP @@ -34,21 +34,41 @@ * -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread1.log * -Dtimeout=2 -DheapUsageMinBound=30 -DheapUsageMaxBound=80 * -Dthreads=2 gc.stress.TestStressIHOPMultiThread + */ + +/* + * @test + * @requires vm.gc.G1 * @run main/othervm/timeout=200 -Xmx256m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1 * -XX:+UseG1GC -XX:G1HeapRegionSize=2m -XX:+G1UseAdaptiveIHOP * -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread2.log * -Dtimeout=2 -DheapUsageMinBound=60 -DheapUsageMaxBound=90 * -Dthreads=3 gc.stress.TestStressIHOPMultiThread + */ + +/* + * @test + * @requires vm.gc.G1 * @run main/othervm/timeout=200 -Xmx256m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1 * -XX:+UseG1GC -XX:G1HeapRegionSize=4m -XX:-G1UseAdaptiveIHOP * -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread3.log * -Dtimeout=2 -DheapUsageMinBound=40 -DheapUsageMaxBound=90 * -Dthreads=5 gc.stress.TestStressIHOPMultiThread + */ + +/* + * @test + * @requires vm.gc.G1 * @run main/othervm/timeout=200 -Xmx128m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1 * -XX:+UseG1GC -XX:G1HeapRegionSize=8m -XX:+G1UseAdaptiveIHOP * -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread4.log * -Dtimeout=2 -DheapUsageMinBound=20 -DheapUsageMaxBound=90 * -Dthreads=10 gc.stress.TestStressIHOPMultiThread + */ + +/* + * @test + * @requires vm.gc.G1 * @run main/othervm/timeout=200 -Xmx512m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1 * -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:+G1UseAdaptiveIHOP * -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread5.log diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java 2024-01-09 21:19:49.000000000 +0000 @@ -27,13 +27,12 @@ import sun.hotspot.WhiteBox; /* - * @test TestStressRSetCoarsening.java + * @test * @key stress * @bug 8146984 8147087 * @requires vm.gc.G1 * @requires os.maxMemory > 3G * @requires vm.opt.MaxGCPauseMillis == "null" - * * @summary Stress G1 Remembered Set by creating a lot of cross region links * @modules java.base/jdk.internal.misc * @library /test/lib @@ -43,27 +42,87 @@ * @run main/othervm/timeout=300 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 - * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 1 0 300 + * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 1 0 300 + */ + +/* + * @test + * @requires vm.gc.G1 + * @requires os.maxMemory > 3G + * @requires vm.opt.MaxGCPauseMillis == "null" + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=300 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 - * -Xmx500m -XX:G1HeapRegionSize=8m gc.stress.TestStressRSetCoarsening 1 10 300 + * -Xmx500m -XX:G1HeapRegionSize=8m gc.stress.TestStressRSetCoarsening 1 10 300 + */ + +/* + * @test + * @requires vm.gc.G1 + * @requires os.maxMemory > 3G + * @requires vm.opt.MaxGCPauseMillis == "null" + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=300 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 * -Xmx500m -XX:G1HeapRegionSize=32m gc.stress.TestStressRSetCoarsening 42 10 300 + */ + +/* + * @test + * @requires vm.gc.G1 + * @requires os.maxMemory > 3G + * @requires vm.opt.MaxGCPauseMillis == "null" + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=300 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 - * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 2 0 300 + * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 2 0 300 + */ + +/* + * @test + * @requires vm.gc.G1 + * @requires os.maxMemory > 3G + * @requires vm.opt.MaxGCPauseMillis == "null" + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=1800 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 - * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 500 0 1800 + * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 500 0 1800 + */ + +/* + * @test + * @requires vm.gc.G1 + * @requires os.maxMemory > 3G + * @requires vm.opt.MaxGCPauseMillis == "null" + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=1800 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000 - * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 10 10 1800 + * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 10 10 1800 */ /** @@ -96,7 +155,7 @@ } int objectsPerRegion = Integer.parseInt(args[0]); // 1 means humongous int regsToRefresh = Integer.parseInt(args[1]); // 0 means no regions to refresh at the end of cycle - int timeout = Integer.parseInt(args[2]); // in seconds, test should stop working eariler + int timeout = Integer.parseInt(args[2]); // in seconds, test should stop working earlier new TestStressRSetCoarsening(objectsPerRegion, regsToRefresh, timeout).go(); } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,7 +30,6 @@ import java.lang.management.MemoryPoolMXBean; import java.lang.management.ManagementFactory; import java.lang.management.MemoryUsage; -import java.nio.ByteBuffer; import java.util.ArrayDeque; import java.util.HashMap; import java.util.List; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,7 +26,6 @@ // A test that stresses a full GC by allocating objects of different lifetimes // and concurrently calling System.gc(). -import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java 2024-01-09 21:19:49.000000000 +0000 @@ -38,7 +38,6 @@ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC gc.whitebox.TestConcMarkCycleWB * @summary Verifies that ConcurrentMarking-related WB works properly */ -import static jdk.test.lib.Asserts.assertFalse; import static jdk.test.lib.Asserts.assertTrue; import sun.hotspot.WhiteBox; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,6 +33,8 @@ * @build HelloStringGC sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main ExerciseGC + * @run main/othervm -XX:+UseStringDeduplication ExerciseGC + * @run main/othervm -XX:-CompactStrings ExerciseGC */ public class ExerciseGC { public static void main(String[] args) throws Exception { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java 2024-01-09 21:19:49.000000000 +0000 @@ -36,6 +36,8 @@ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission * @build HelloString * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions + * @run main/othervm -XX:+UseStringDeduplication -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions + * @run main/othervm -XX:-CompactStrings -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions */ import jdk.test.lib.Asserts; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java 2024-01-09 21:19:49.000000000 +0000 @@ -34,6 +34,8 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main InternSharedString + * @run main/othervm -XX:+UseStringDeduplication InternSharedString + * @run main/othervm -XX:-CompactStrings InternSharedString */ public class InternSharedString { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java 2024-01-09 21:19:49.000000000 +0000 @@ -32,6 +32,8 @@ * jdk.jartool/sun.tools.jar * @build HelloString * @run main InvalidFileFormat + * @run main/othervm -XX:+UseStringDeduplication InvalidFileFormat + * @run main/othervm -XX:-CompactStrings InvalidFileFormat */ import jdk.test.lib.process.OutputAnalyzer; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java 2024-01-09 21:19:49.000000000 +0000 @@ -32,6 +32,8 @@ * jdk.jartool/sun.tools.jar * @build HelloString * @run main LargePages + * @run main/othervm -XX:+UseStringDeduplication LargePages + * @run main/othervm -XX:-CompactStrings LargePages */ public class LargePages { public static void main(String[] args) throws Exception { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java 2024-01-09 21:19:49.000000000 +0000 @@ -34,6 +34,8 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main LockSharedStrings + * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings + * @run main/othervm -XX:-CompactStrings LockSharedStrings */ public class LockSharedStrings { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java 2024-01-09 21:19:49.000000000 +0000 @@ -32,6 +32,8 @@ * jdk.jartool/sun.tools.jar * @build HelloString * @run main SharedStringsBasic + * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasic + * @run main/othervm -XX:-CompactStrings SharedStringsBasic */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,6 +33,8 @@ * @build HelloStringPlus sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main SharedStringsBasicPlus + * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasicPlus + * @run main/othervm -XX:-CompactStrings SharedStringsBasicPlus */ public class SharedStringsBasicPlus { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,8 @@ * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run main SharedStringsStress + * @run main/othervm -XX:+UseStringDeduplication SharedStringsStress + * @run main/othervm -XX:-CompactStrings SharedStringsStress */ import java.io.File; import java.io.FileOutputStream; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,6 +33,8 @@ * @build sun.hotspot.WhiteBox SharedStringsWb * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main SharedStringsWbTest + * @run main/othervm -XX:+UseStringDeduplication SharedStringsWbTest + * @run main/othervm -XX:-CompactStrings SharedStringsWbTest */ import java.io.*; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java 2024-01-09 21:19:49.000000000 +0000 @@ -32,6 +32,8 @@ * @modules java.base/jdk.internal.misc * @modules java.management * @run main SysDictCrash + * @run main/othervm -XX:+UseStringDeduplication SysDictCrash + * @run main/othervm -XX:-CompactStrings SysDictCrash */ import jdk.test.lib.process.OutputAnalyzer; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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 @@ -85,6 +85,13 @@ (*env)->ExceptionDescribe(env); exit(1); } + + res = (*jvm)->DetachCurrentThread(jvm); + if (res != JNI_OK) { + fprintf(stderr, "Test ERROR. Can't detach current thread: %d\n", res); + exit(1); + } + printf("Native thread terminating\n"); return NULL; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/jsig/Testjsig.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/jsig/Testjsig.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/runtime/jsig/Testjsig.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/runtime/jsig/Testjsig.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2016, 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test Testjsig.java + * @bug 8017498 + * @bug 8020791 + * @bug 8021296 + * @bug 8022301 + * @bug 8025519 + * @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX + * @requires (os.family == "linux") + * @library /test/lib + * @compile TestJNI.java + * @run driver Testjsig + */ + +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; + +public class Testjsig { + + public static void main(String[] args) throws Throwable { + + // Get the JDK, library and class path properties + String libpath = System.getProperty("java.library.path"); + + // Create a new java process for the TestJNI Java/JNI test + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-Djava.library.path=" + libpath + ":.", + "TestJNI", + "100"); + + // Start the process and check the output + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("old handler"); + } +} diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java 2024-01-09 21:19:49.000000000 +0000 @@ -88,6 +88,9 @@ static void test(String type) throws Throwable { ProcessBuilder pb = ProcessTools.createTestJvm("-XX:+CreateCoredumpOnCrash", "-Xmx512m", "-XX:MaxMetaspaceSize=64m", "-XX:+CrashOnOutOfMemoryError", "-XX:-TransmitErrorReport", + // The test loads lots of small classes to exhaust Metaspace, skip method + // dependency verification to improve performance in debug builds. + Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "--show-version", TestJmapCore.class.getName(), type); boolean useDefaultUlimit = useDefaultUlimit(); diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/serviceability/sa/TestUniverse.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/serviceability/sa/TestUniverse.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/serviceability/sa/TestUniverse.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/serviceability/sa/TestUniverse.java 2024-01-09 21:19:49.000000000 +0000 @@ -29,99 +29,107 @@ import java.util.HashMap; import jdk.test.lib.apps.LingeredApp; import jtreg.SkippedException; +import sun.hotspot.gc.GC; /** * @test * @summary Test the 'universe' command of jhsdb clhsdb. - * @requires vm.hasSA & vm.gc != "Z" + * @requires vm.hasSA * @bug 8190307 * @library /test/lib * @build jdk.test.lib.apps.* * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestUniverse withoutZ - */ - -/** - * @test - * @summary Test the 'universe' command of jhsdb clhsdb. - * @requires vm.hasSA & vm.gc == "Z" - * @bug 8190307 - * @library /test/lib - * @build jdk.test.lib.apps.* - * @build sun.hotspot.WhiteBox - * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestUniverse withZ + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestUniverse */ public class TestUniverse { - private static void testClhsdbForUniverse(long lingeredAppPid, - String gc) throws Exception { - + private static void testClhsdbForUniverse(long lingeredAppPid, GC gc) throws Exception { ClhsdbLauncher launcher = new ClhsdbLauncher(); List cmds = List.of("universe"); Map> expStrMap = new HashMap<>(); List expStrings = new ArrayList(); expStrings.add("Heap Parameters"); - if (gc.contains("UseZGC")) { - expStrings.add("ZHeap"); - } - if (gc.contains("G1GC")) { - expStrings.add("garbage-first heap"); - expStrings.add("region size"); - expStrings.add("G1 Young Generation:"); - expStrings.add("regions ="); - } - if (gc.contains("UseConcMarkSweepGC")) { - expStrings.add("Gen 1: concurrent mark-sweep generation"); - } - if (gc.contains("UseSerialGC")) { + switch (gc) { + case Serial: expStrings.add("Gen 1: old"); - } - if (gc.contains("UseParallelGC")) { + break; + + case Parallel: expStrings.add("ParallelScavengeHeap"); expStrings.add("PSYoungGen"); expStrings.add("eden"); - } - if (gc.contains("UseEpsilonGC")) { + break; + + case ConcMarkSweep: + expStrings.add("Gen 1: concurrent mark-sweep generation"); + break; + + case G1: + expStrings.add("garbage-first heap"); + expStrings.add("region size"); + expStrings.add("G1 Young Generation:"); + expStrings.add("regions ="); + break; + + case Epsilon: expStrings.add("Epsilon heap"); expStrings.add("reserved"); expStrings.add("committed"); expStrings.add("used"); + break; + + case Z: + expStrings.add("ZHeap"); + break; + + case Shenandoah: + expStrings.add("Shenandoah heap"); + break; } + expStrMap.put("universe", expStrings); launcher.run(lingeredAppPid, cmds, expStrMap, null); } - public static void test(String gc) throws Exception { + private static void test(GC gc) throws Exception { LingeredApp app = null; try { - List vmArgs = new ArrayList(); - vmArgs.add("-XX:+UnlockExperimentalVMOptions"); // unlock experimental GCs - vmArgs.add(gc); - app = LingeredApp.startApp(vmArgs); - System.out.println ("Started LingeredApp with the GC option " + gc + - " and pid " + app.getPid()); + app = LingeredApp.startApp(List.of("-XX:+UnlockExperimentalVMOptions", "-XX:+Use" + gc + "GC")); + System.out.println ("Started LingeredApp with " + gc + "GC and pid " + app.getPid()); testClhsdbForUniverse(app.getPid(), gc); } finally { LingeredApp.stopApp(app); } } + private static boolean isSelectedAndSupported(GC gc) { + if (!gc.isSelected()) { + // Not selected + return false; + } + + if (Compiler.isGraalEnabled()) { + if (gc == GC.ConcMarkSweep || gc == GC.Epsilon || gc == GC.Z || gc == GC.Shenandoah) { + // Not supported + System.out.println ("Skipped testing of " + gc + "GC, not supported by Graal"); + return false; + } + } + + // Selected and supported + return true; + } + public static void main (String... args) throws Exception { - System.out.println("Starting TestUniverse test"); + System.out.println("Starting TestUniverse"); try { - test("-XX:+UseG1GC"); - test("-XX:+UseParallelGC"); - test("-XX:+UseSerialGC"); - if (!Compiler.isGraalEnabled()) { // Graal does not support all GCs - test("-XX:+UseConcMarkSweepGC"); - if (args[0].equals("withZ")) { - test("-XX:+UseZGC"); + for (GC gc: GC.values()) { + if (isSelectedAndSupported(gc)) { + test(gc); } - test("-XX:+UseEpsilonGC"); } } catch (SkippedException se) { throw se; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001.java 2024-01-09 21:19:49.000000000 +0000 @@ -50,9 +50,9 @@ * To check up on the method, a debugger, * upon getting new set for ClassPrepareEvent, * suspends VM with the method VirtualMachine.suspend(), - * gets the List of geduggee's threads calling VM.allThreads(), + * gets the List of debuggee's threads calling VM.allThreads(), * invokes the method EventSet.resume(), and - * gets another List of geduggee's threads. + * gets another List of debuggee's threads. * The debugger then compares values of * each thread's suspendCount from first and second Lists. * @@ -63,6 +63,13 @@ * making special clases loaded and prepared to create the Events * - Upon getting the Events, * the debugger performs the check required. + * - The debugger informs the debuggee when it completes + * each test case, so it will wait before hitting + * communication breakpoints. + * This prevents the breakpoint SUSPEND_ALL policy + * disrupting the first test case check for + * SUSPEND_NONE, if the debuggee gets ahead of + * the debugger processing. */ public class resume001 extends TestDebuggerType1 { @@ -233,6 +240,7 @@ default: throw new Failure("** default case 1 **"); } + informDebuggeeTestCase(i); } display("......--> vm.resume()"); @@ -261,5 +269,22 @@ throw new Failure("** FAILURE to set up ClassPrepareRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume001a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -57,6 +57,7 @@ static int exitCode = PASSED; + static int testCase = -1; static int instruction = 1; static int end = 0; // static int quit = 0; @@ -100,6 +101,10 @@ case 0: TestClass2 obj2 = new TestClass2(); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); + break; case 1: @@ -119,6 +124,16 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class TestClass2 { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume002 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume002 ", sHeader2 = "--> debugger: ", @@ -503,6 +503,7 @@ log2("......--> vm.resume()"); vm.resume(); + informDebuggeeTestCase(i); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } log1(" TESTING ENDS"); @@ -642,5 +643,22 @@ throw new JDITestRuntimeException("** FAILURE to set up AccessWatchpointRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume002a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -41,6 +41,7 @@ static ArgumentHandler argHandler; static Log log; + static int testCase = -1; //-------------------------------------------------- log procedures @@ -98,8 +99,12 @@ //------------------------------------------------------ section tested - case 0: resume002aTestClass.method(); - break; + case 0: + resume002aTestClass.method(); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); + break; case 1: resume002aTestClass.method(); break; @@ -118,6 +123,17 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } + } class resume002aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume003 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume003 ", sHeader2 = "--> debugger: ", @@ -503,6 +503,8 @@ log2("......--> vm.resume()"); vm.resume(); + informDebuggeeTestCase(i); + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } log1(" TESTING ENDS"); @@ -642,5 +644,22 @@ throw new JDITestRuntimeException("** FAILURE to set up ModificationWatchpointRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,8 @@ public class resume003a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section + static int testCase = -1; static final int PASSED = 0; static final int FAILED = 2; @@ -98,8 +99,12 @@ //------------------------------------------------------ section tested - case 0: resume003aTestClass.method(); - break; + case 0: + resume003aTestClass.method(); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); + break; case 1: resume003aTestClass.method(); break; @@ -118,6 +123,16 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume003aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume004 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume004 ", sHeader2 = "--> debugger: ", @@ -493,6 +493,7 @@ default: throw new JDITestRuntimeException("** default case 1 **"); } + informDebuggeeTestCase(i); } log2("......--> vm.resume()"); @@ -638,5 +639,22 @@ throw new JDITestRuntimeException("** FAILURE to set up BreakpointRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,8 @@ public class resume004a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section + static int testCase = -1; static final int PASSED = 0; static final int FAILED = 2; @@ -98,8 +99,10 @@ //------------------------------------------------------ section tested - case 0: resume004aTestClass.method(); - break; + case 0: + resume004aTestClass.method(); + waitForTestCase(0); + break; case 1: resume004aTestClass.method(); break; @@ -118,6 +121,16 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume004aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume005 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume005 ", sHeader2 = "--> debugger: ", @@ -493,6 +493,7 @@ default: throw new JDITestRuntimeException("** default case 1 **"); } + informDebuggeeTestCase(i); } log2("......--> vm.resume()"); @@ -634,5 +635,22 @@ throw new JDITestRuntimeException("** FAILURE to set up ExceptionRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,8 @@ public class resume005a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section + static int testCase = -1; static final int PASSED = 0; static final int FAILED = 2; @@ -98,8 +99,10 @@ //------------------------------------------------------ section tested - case 0: resume005aTestClass.method(); - break; + case 0: + resume005aTestClass.method(); + waitForTestCase(0); + break; case 1: resume005aTestClass.method(); break; @@ -122,7 +125,16 @@ public static void nullMethod() { throw new NullPointerException("test"); } - + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume005aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume006 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume006 ", sHeader2 = "--> debugger: ", @@ -495,6 +495,7 @@ log2("......--> vm.resume()"); vm.resume(); + informDebuggeeTestCase(i); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } log1(" TESTING ENDS"); @@ -632,5 +633,22 @@ throw new JDITestRuntimeException("** FAILURE to set up MethodEntryRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume006a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -41,6 +41,7 @@ static ArgumentHandler argHandler; static Log log; + static int testCase = -1; //-------------------------------------------------- log procedures @@ -98,8 +99,12 @@ //------------------------------------------------------ section tested - case 0: resume006aTestClass.method(); - break; + case 0: + resume006aTestClass.method(); + // Wait for debugger to complete the first test case + // before advancing to the next breakpoint + waitForTestCase(0); + break; case 1: resume006aTestClass.method(); break; @@ -118,7 +123,16 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } - + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume006aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume007 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = Consts.TEST_PASSED; static final int FAILED = Consts.TEST_FAILED; static final int PASS_BASE = Consts.JCK_STATUS_BASE; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume007 ", sHeader2 = "--> debugger: ", @@ -490,6 +490,7 @@ default: throw new JDITestRuntimeException("** default case 1 **"); } + informDebuggeeTestCase(i); } log2("......--> vm.resume()"); @@ -631,5 +632,22 @@ throw new JDITestRuntimeException("** FAILURE to set up MethodExitRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,8 @@ public class resume007a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section + static int testCase = -1; static final int PASSED = 0; static final int FAILED = 2; @@ -98,8 +99,10 @@ //------------------------------------------------------ section tested - case 0: resume007aTestClass.method(); - break; + case 0: + resume007aTestClass.method(); + waitForTestCase(0); + break; case 1: resume007aTestClass.method(); break; @@ -118,7 +121,16 @@ log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } - + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume007aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008.java 2024-01-09 21:19:49.000000000 +0000 @@ -50,9 +50,9 @@ * To check up on the method, a debugger, * upon getting new set for the EventSet, * suspends VM with the method VirtualMachine.suspend(), - * gets the List of geduggee's threads calling VM.allThreads(), + * gets the List of debuggee's threads calling VM.allThreads(), * invokes the method EventSet.resume(), and - * gets another List of geduggee's threads. + * gets another List of debuggee's threads. * The debugger then compares values of * each thread's suspendCount from first and second Lists. * @@ -63,6 +63,13 @@ * to be resulting in the event. * - Upon getting new event, the debugger * performs the check corresponding to the event. + * - The debugger informs the debuggee when it completes + * each test case, so it will wait before hitting + * communication breakpoints. + * This prevents the breakpoint SUSPEND_ALL policy + * disrupting the first test case check for + * SUSPEND_NONE, if the debuggee gets ahead of + * the debugger processing. */ public class resume008 extends TestDebuggerType1 { @@ -124,7 +131,9 @@ } display("......waiting for new ThreadStartEvent : " + i); - EventSet eventSet = eventHandler.waitForRequestedEventSet(new EventRequest[]{eventRequest}, waitTime, true); + EventSet eventSet = eventHandler + .waitForRequestedEventSet(new EventRequest[]{eventRequest}, + waitTime, true); EventIterator eventIterator = eventSet.eventIterator(); Event newEvent = eventIterator.nextEvent(); @@ -134,7 +143,8 @@ } else { String property = (String) newEvent.request().getProperty("number"); - display(" got new ThreadStartEvent with propety 'number' == " + property); + display(" got new ThreadStartEvent with propety 'number' == " + + property); display("......checking up on EventSet.resume()"); display("......--> vm.suspend();"); @@ -144,7 +154,8 @@ Map suspendsCounts1 = new HashMap(); for (ThreadReference threadReference : vm.allThreads()) { - suspendsCounts1.put(threadReference.name(), threadReference.suspendCount()); + suspendsCounts1.put(threadReference.name(), + threadReference.suspendCount()); } display(suspendsCounts1.toString()); @@ -154,7 +165,8 @@ display(" getting : Map suspendsCounts2"); Map suspendsCounts2 = new HashMap(); for (ThreadReference threadReference : vm.allThreads()) { - suspendsCounts2.put(threadReference.name(), threadReference.suspendCount()); + suspendsCounts2.put(threadReference.name(), + threadReference.suspendCount()); } display(suspendsCounts2.toString()); @@ -163,85 +175,90 @@ switch (policy) { - case SUSPEND_NONE : - display(" case SUSPEND_NONE"); - for (String threadName : suspendsCounts1.keySet()) { - display(" checking " + threadName); - if (!suspendsCounts2.containsKey(threadName)) { - complain("ERROR: couldn't get ThreadReference for " + threadName); - testExitCode = TEST_FAILED; - break; - } - int count1 = suspendsCounts1.get(threadName); - int count2 = suspendsCounts2.get(threadName); - if (count1 != count2) { - complain("ERROR: suspendCounts don't match for : " + threadName); - complain("before resuming : " + count1); - complain("after resuming : " + count2); - testExitCode = TEST_FAILED; - break; - } - } - break; - - case SUSPEND_THREAD : - display(" case SUSPEND_THREAD"); - for (String threadName : suspendsCounts1.keySet()) { - display("checking " + threadName); - if (!suspendsCounts2.containsKey(threadName)) { - complain("ERROR: couldn't get ThreadReference for " + threadName); - testExitCode = TEST_FAILED; - break; - } - int count1 = suspendsCounts1.get(threadName); - int count2 = suspendsCounts2.get(threadName); - String eventThreadName = ((ThreadStartEvent)newEvent).thread().name(); - int expectedValue = count2 + (eventThreadName.equals(threadName) ? 1 : 0); - if (count1 != expectedValue) { - complain("ERROR: suspendCounts don't match for : " + threadName); - complain("before resuming : " + count1); - complain("after resuming : " + count2); - testExitCode = TEST_FAILED; - break; - } - } - break; - - case SUSPEND_ALL : - - display(" case SUSPEND_ALL"); - for (String threadName : suspendsCounts1.keySet()) { - display("checking " + threadName); - - if (!newEvent.request().equals(eventRequest)) - break; - if (!suspendsCounts2.containsKey(threadName)) { - complain("ERROR: couldn't get ThreadReference for " + threadName); - testExitCode = TEST_FAILED; - break; - } - int count1 = suspendsCounts1.get(threadName); - int count2 = suspendsCounts2.get(threadName); - if (count1 != count2 + 1) { - complain("ERROR: suspendCounts don't match for : " + threadName); - complain("before resuming : " + count1); - complain("after resuming : " + count2); - testExitCode = TEST_FAILED; - break; - } + case SUSPEND_NONE : + display(" case SUSPEND_NONE"); + for (String threadName : suspendsCounts1.keySet()) { + display(" checking " + threadName); + if (!suspendsCounts2.containsKey(threadName)) { + complain("ERROR: couldn't get ThreadReference for " + + threadName); + testExitCode = TEST_FAILED; + break; } - break; + int count1 = suspendsCounts1.get(threadName); + int count2 = suspendsCounts2.get(threadName); + if (count1 != count2) { + complain("ERROR: suspendCounts don't match for : " + + threadName); + complain("before resuming : " + count1); + complain("after resuming : " + count2); + testExitCode = TEST_FAILED; + break; + } + } + break; + + case SUSPEND_THREAD : + display(" case SUSPEND_THREAD"); + for (String threadName : suspendsCounts1.keySet()) { + display("checking " + threadName); + if (!suspendsCounts2.containsKey(threadName)) { + complain("ERROR: couldn't get ThreadReference for " + + threadName); + testExitCode = TEST_FAILED; + break; + } + int count1 = suspendsCounts1.get(threadName); + int count2 = suspendsCounts2.get(threadName); + String eventThreadName = ((ThreadStartEvent)newEvent) + .thread().name(); + int expectedValue = count2 + + (eventThreadName.equals(threadName) ? 1 : 0); + if (count1 != expectedValue) { + complain("ERROR: suspendCounts don't match for : " + + threadName); + complain("before resuming : " + count1); + complain("after resuming : " + count2); + testExitCode = TEST_FAILED; + break; + } + } + break; - default: throw new Failure("** default case 1 **"); + case SUSPEND_ALL : + display(" case SUSPEND_ALL"); + for (String threadName : suspendsCounts1.keySet()) { + display("checking " + threadName); + if (!newEvent.request().equals(eventRequest)) + break; + if (!suspendsCounts2.containsKey(threadName)) { + complain("ERROR: couldn't get ThreadReference for " + + threadName); + testExitCode = TEST_FAILED; + break; + } + int count1 = suspendsCounts1.get(threadName); + int count2 = suspendsCounts2.get(threadName); + if (count1 != count2 + 1) { + complain("ERROR: suspendCounts don't match for : " + + threadName); + complain("before resuming : " + count1); + complain("after resuming : " + count2); + testExitCode = TEST_FAILED; + break; + } + } + break; + default: throw new Failure("** default case 1 **"); } - } + informDebuggeeTestCase(i); + } display("......--> vm.resume()"); vm.resume(); } return; } - private ThreadStartRequest settingThreadStartRequest(int suspendPolicy, String property) { try { @@ -254,5 +271,22 @@ throw new Failure("** FAILURE to set up ThreadStartRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume008a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -62,6 +62,7 @@ static int exitCode = PASSED; + static int testCase = -1; static int instruction = 1; static int end = 0; // static int quit = 0; @@ -70,6 +71,7 @@ static int lineForComm = 2; + // Debugger sets a breakpoint here to track debuggee private static void methodForCommunication() { int i1 = instruction; int i2 = i1; @@ -85,47 +87,38 @@ log1("debuggee started!"); label0: - for (int i = 0; ; i++) { - - if (instruction > maxInstr) { - logErr("ERROR: unexpected instruction: " + instruction); - exitCode = FAILED; - break ; - } - - switch (i) { - + for (int i = 0; ; i++) { + if (instruction > maxInstr) { + logErr("ERROR: unexpected instruction: " + instruction); + exitCode = FAILED; + break ; + } + switch (i) { //------------------------------------------------------ section tested - - case 0: - thread0 = new Threadresume008a("thread0"); - methodForCommunication(); - - threadStart(thread0); - - thread1 = new Threadresume008a("thread1"); - methodForCommunication(); - break; - - case 1: - threadStart(thread1); - - thread2 = new Threadresume008a("thread2"); - methodForCommunication(); - break; - - case 2: - threadStart(thread2); - - //------------------------------------------------- standard end section - - default: - instruction = end; - methodForCommunication(); - break label0; - } + case 0: + thread0 = new Threadresume008a("thread0"); + methodForCommunication(); + threadStart(thread0); + thread1 = new Threadresume008a("thread1"); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); + methodForCommunication(); + break; + case 1: + threadStart(thread1); + thread2 = new Threadresume008a("thread2"); + methodForCommunication(); + break; + case 2: + threadStart(thread2); + //------------------------------------------------- standard end section + default: + instruction = end; + methodForCommunication(); + break label0; } - + } log1("debuggee exits"); System.exit(exitCode + PASS_BASE); } @@ -145,24 +138,29 @@ } return PASSED; } - + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } static class Threadresume008a extends Thread { - String tName = null; - public Threadresume008a(String threadName) { super(threadName); tName = threadName; } - public void run() { log1(" 'run': enter :: threadName == " + tName); synchronized (waitnotifyObj) { - waitnotifyObj.notify(); + waitnotifyObj.notify(); } log1(" 'run': exit :: threadName == " + tName); return; } } - } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009.java 2024-01-09 21:19:49.000000000 +0000 @@ -50,9 +50,9 @@ * To check up on the method, a debugger, * upon getting new set for the EventSet, * suspends VM with the method VirtualMachine.suspend(), - * gets the List of geduggee's threads calling VM.allThreads(), + * gets the List of debuggee's threads calling VM.allThreads(), * invokes the method EventSet.resume(), and - * gets another List of geduggee's threads. + * gets another List of debuggee's threads. * The debugger then compares values of * each thread's suspendCount from first and second Lists. * @@ -63,6 +63,13 @@ * to be resulting in the event. * - Upon getting new event, the debugger * performs the check corresponding to the event. + * - The debugger informs the debuggee when it completes + * each test case, so it will wait before hitting + * communication breakpoints. + * This prevents the breakpoint SUSPEND_ALL policy + * disrupting the first test case check for + * SUSPEND_NONE, if the debuggee gets ahead of + * the debugger processing. */ public class resume009 extends TestDebuggerType1 { @@ -233,6 +240,7 @@ default: throw new Failure("** default case 1 **"); } + informDebuggeeTestCase(i); } display("......--> vm.resume()"); @@ -253,5 +261,22 @@ throw new Failure("** FAILURE to set up ThreadDeathRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume009a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -62,6 +62,7 @@ static int exitCode = PASSED; + static int testCase = -1; static int instruction = 1; static int end = 0; // static int quit = 0; @@ -104,6 +105,9 @@ threadRun(thread0); thread1 = new Threadresume009a("thread1"); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); methodForCommunication(); break; @@ -152,6 +156,16 @@ } return PASSED; } + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } static class Threadresume009a extends Thread { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010.java 2024-01-09 21:19:49.000000000 +0000 @@ -48,9 +48,9 @@ * To check up on the method, a debugger,
* upon getting new set for the EventSet,
* suspends VM with the method VirtualMachine.suspend(),
- * gets the List of geduggee's threads calling VM.allThreads(),
+ * gets the List of debuggee's threads calling VM.allThreads(),
* invokes the method EventSet.resume(), and
- * gets another List of geduggee's threads.
+ * gets another List of debuggee's threads.
* The debugger then compares values of
* each thread's suspendCount from first and second Lists.
*
@@ -87,12 +87,12 @@ public class resume010 { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; static final int PASS_BASE = 95; - //----------------------------------------------------- templete parameters + //----------------------------------------------------- template parameters static final String sHeader1 = "\n==> nsk/jdi/EventSet/resume/resume010 ", sHeader2 = "--> debugger: ", @@ -488,6 +488,7 @@ default: throw new JDITestRuntimeException("** default case 1 **"); } + informDebuggeeTestCase(i); } log2("......--> vm.resume()"); @@ -627,5 +628,22 @@ throw new JDITestRuntimeException("** FAILURE to set up StepRequest **"); } } - + /** + * Inform debuggee which thread test the debugger has completed. + * Used for synchronization, so the debuggee does not move too quickly. + * @param testCase index of just completed test + */ + void informDebuggeeTestCase(int testCase) { + try { + ((ClassType)debuggeeClass) + .setValue(debuggeeClass.fieldByName("testCase"), + vm.mirrorOf(testCase)); + } catch (InvalidTypeException ite) { + throw new Failure("** FAILURE setting testCase **"); + } catch (ClassNotLoadedException cnle) { + throw new Failure("** FAILURE notifying debuggee **"); + } catch (VMDisconnectedException e) { + throw new Failure("** FAILURE debuggee connection **"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010a.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010a.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010a.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010a.java 2024-01-09 21:19:49.000000000 +0000 @@ -33,7 +33,7 @@ public class resume010a { - //----------------------------------------------------- templete section + //----------------------------------------------------- template section static final int PASSED = 0; static final int FAILED = 2; @@ -60,6 +60,7 @@ static int exitCode = PASSED; + static int testCase = -1; static int instruction = 1; static int end = 0; // static int quit = 0; @@ -98,8 +99,12 @@ //------------------------------------------------------ section tested - case 0: resume010aTestClass.method(); - break; + case 0: + resume010aTestClass.method(); + // Wait for debugger to complete the first test case + // before advancing to the first breakpoint + waitForTestCase(0); + break; case 1: resume010aTestClass.method(); break; @@ -117,7 +122,16 @@ System.exit(exitCode + PASS_BASE); } - + // Synchronize with debugger progression. + static void waitForTestCase(int t) { + while (testCase < t) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // ignored + } + } + } } class resume010aTestClass { diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/stress/numeric/TEST.properties openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/stress/numeric/TEST.properties --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/nsk/stress/numeric/TEST.properties 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/nsk/stress/numeric/TEST.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# -# Copyright (c) 2018, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -exclusiveAccess.dirs=. diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java 2024-01-09 21:19:49.000000000 +0000 @@ -24,6 +24,7 @@ /* * @test + * @key stress * * @summary converted from VM Testbase vm/mlvm/meth/stress/compiler/deoptimize. * VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine] diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2019, 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 @@ -27,8 +27,7 @@ * @bug 6969574 * * @summary converted from VM Testbase vm/mlvm/mixed/stress/regression/b6969574. - * VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine] - * VM Testbase comments: 8079650 + * VM Testbase keywords: [feature_mlvm, nonconcurrent] * * @library /vmTestbase * /test/lib @@ -313,10 +312,8 @@ private final static int REFLECTION_CALL = 1; private final static int INVOKE_EXACT = 2; private final static int INVOKE = 3; - private final static int INVOKE_WITHARG = 4; - private final static int INVOKE_WITHARG_TYPECONV = 5; - private final static int INDY = 6; - private final static int BENCHMARK_COUNT = 7; + private final static int INDY = 4; + private final static int BENCHMARK_COUNT = 5; // // Test body @@ -356,18 +353,6 @@ } }); - benchmarks[INVOKE_WITHARG] = new Benchmark("MH.invokeWithArguments(), exact types", new T() { - public void run() throws Throwable { - mhTestee.invokeWithArguments(testData, TESTEE_ARG2, TESTEE_ARG3); - } - }); - - benchmarks[INVOKE_WITHARG_TYPECONV] = new Benchmark("MH.invokeWithArguments() + type conv.", new T() { - public void run() throws Throwable { - mhTestee.invokeWithArguments((Object) testData, null, (Short) Short.MAX_VALUE); - } - }); - benchmarks[INDY] = new Benchmark("invokedynamic instruction", new T() { public void run() throws Throwable { indyWrapper(testData); @@ -412,11 +397,9 @@ // TODO: exclude GC time, compilation time (optionally) from measurements print("Comparing invocation time orders"); - verifyTimeOrder(results[REFLECTION_CALL], results[INVOKE_EXACT]); + verifyTimeOrder(results[INDY], results[REFLECTION_CALL]); verifyTimeOrder(results[INVOKE_EXACT], results[DIRECT_CALL]); verifyTimeOrder(results[INVOKE], results[DIRECT_CALL]); - verifyTimeOrder(results[INVOKE_WITHARG], results[INVOKE_EXACT]); - verifyTimeOrder(results[INVOKE_WITHARG_TYPECONV], results[INVOKE_EXACT]); verifyTimeOrder(results[INVOKE_EXACT], results[INDY]); return true; diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/README openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/README --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/README 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/README 2024-01-09 21:19:49.000000000 +0000 @@ -131,7 +131,7 @@ where majorVer - major version of class files for generated concrete classes - values: ver49, ver50, ver51, ver52 + values: ver49, ver52 methodFlags - additional access flags for methods in generated classes values: diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.BasicTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.ConflictingDefaultsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/DefaultVsAbstract_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.DefaultVsAbstractTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/MethodResolution_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.MethodResolutionTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.PrivateMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Redefine_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.RedefineTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v50_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 50 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_none_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 0 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_strict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2048 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_sync_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 32 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_direct_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode direct - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_invoke_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode invoke - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_noredefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_noredefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_noredefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_noredefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_noredefine. - * VM Testbase keywords: [defmeth, jdk8, quick] - * - * @library /vmTestbase /test/lib - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm - * -XX:+IgnoreUnrecognizedVMOptions - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_redefine/TestDescription.java openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_redefine/TestDescription.java --- openjdk-lts-11.0.21+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_redefine/TestDescription.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_redefine/TestDescription.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open - * - * @summary converted from VM Testbase vm/runtime/defmeth/scenarios/StaticMethods_v51_syncstrict_reflect_redefine. - * VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick] - * - * @library /vmTestbase /test/lib - * - * @comment build retransform.jar in current dir - * @run driver vm.runtime.defmeth.shared.BuildJar - * - * @run driver jdk.test.lib.FileInstaller . . - * @run main/othervm/native - * -agentlib:redefineClasses - * -javaagent:retransform.jar - * vm.runtime.defmeth.StaticMethodsTest - * -ver 51 - * -flags 2080 - * -redefine - * -retransform - * -mode reflect - */ - diff -Nru openjdk-lts-11.0.21+9/test/jdk/ProblemList.txt openjdk-lts-11.0.22+7/test/jdk/ProblemList.txt --- openjdk-lts-11.0.21+9/test/jdk/ProblemList.txt 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/ProblemList.txt 2024-01-09 21:19:49.000000000 +0000 @@ -116,7 +116,6 @@ java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java 8168389 windows-all,macosx-all java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java 8224055 macosx-all -java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all,macosx-all java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all @@ -128,7 +127,6 @@ java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510 macosx-all -javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all,macosx-all java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-all java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java 6986252 macosx-all @@ -170,7 +168,6 @@ java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474,8224055 macosx-all,windows-all java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java 8129778 generic-all java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java 8129778 generic-all -java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java 8252713 linux-all java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java 8129778 generic-all java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.java 8194947 generic-all @@ -372,7 +369,6 @@ java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665 macosx-all java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665 macosx-all java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326 macosx-all -java/awt/Mouse/EnterExitEvents/DragWindowTest.java 8023562 macosx-all java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021 macosx-all java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java 8051455 macosx-all java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java 7124407 macosx-all @@ -441,6 +437,7 @@ java/awt/List/SingleModeDeselect/SingleModeDeselect.java 8196367 windows-all java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java 8061235 macosx-all javax/print/PrintSEUmlauts/PrintSEUmlauts.java 8135174 generic-all +java/awt/font/Rotate/RotatedTextTest.java 8219641 linux-all java/awt/font/TextLayout/LigatureCaretTest.java 8197821 generic-all java/awt/Graphics2D/DrawString/RotTransText.java 8197797 generic-all java/awt/image/VolatileImage/CustomCompositeTest.java 8199002 windows-all,linux-all @@ -464,7 +461,7 @@ java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java 8157147 linux-all,solaris-all,windows-all,macosx-all java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.java 8148041 linux-all java/awt/Toolkit/DesktopProperties/rfe4758438.java 8193547 linux-all -java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 +java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 linux-all java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 8164473 linux-all java/awt/im/memoryleak/InputContextMemoryLeakTest.java 8023814 linux-all,solaris-all @@ -484,7 +481,7 @@ java/awt/PopupMenu/PopupMenuLocation.java 8238720 windows-all java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java 8238720 windows-all java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720 windows-all -java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java +java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java 8238720 windows-all # Several tests which fail sometimes on macos11 java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64 @@ -590,6 +587,7 @@ java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java 8170562 generic-all java/rmi/registry/readTest/CodebaseTest.java 8173324 windows-all +java/rmi/registry/multipleRegistries/MultipleRegistries.java 8268182 macosx-all java/nio/channels/DatagramChannel/ManySourcesAndTargets.java 8264385 macosx-aarch64 @@ -613,8 +611,6 @@ sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-all -sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all - javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64 javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-all javax/net/ssl/DTLS/CipherSuite.java 8202059 macosx-x64 @@ -686,7 +682,6 @@ javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 8024627 macosx-all # The next test below is an intermittent failure javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all -javax/swing/JColorChooser/Test6827032.java 8197825 windows-all javax/swing/JSplitPane/4201995/bug4201995.java 8079127 generic-all javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all @@ -708,7 +703,6 @@ javax/swing/JTabbedPane/4624207/bug4624207.java 8064922 macosx-all javax/swing/JTabbedPane/7024235/Test7024235.java 8028281 macosx-all javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all -javax/swing/plaf/basic/Test6984643.java 8198340 windows-all javax/swing/text/CSSBorder/6796710/bug6796710.java 8196099 windows-all javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java 8194048 windows-all javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all @@ -728,7 +722,6 @@ javax/swing/JTabbedPane/TabProb.java 8236635 linux-all javax/swing/text/GlyphPainter2/6427244/bug6427244.java 8208566 macosx-all javax/swing/JRootPane/4670486/bug4670486.java 8042381 macosx-all -javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all javax/swing/JButton/8151303/PressedIconTest.java 8266246 macosx-aarch64 javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all @@ -823,7 +816,6 @@ java/awt/print/PrinterJob/ScaledText/ScaledText.java 8231226 macosx-all java/awt/print/bug8023392/bug8023392.html 8231231 generic-all java/awt/font/TextLayout/TestJustification.html 8250791 macosx-all -javax/swing/JTabbedPane/4209065/bug4209065.java 8251177 macosx-all java/awt/TrayIcon/DragEventSource/DragEventSource.java 8252242 macosx-all java/awt/FileDialog/DefaultFocusOwner/DefaultFocusOwner.java 7187728 macosx-all,linux-all java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest.html 7187728 macosx-all,linux-all diff -Nru openjdk-lts-11.0.21+9/test/jdk/TEST.ROOT openjdk-lts-11.0.22+7/test/jdk/TEST.ROOT --- openjdk-lts-11.0.21+9/test/jdk/TEST.ROOT 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/TEST.ROOT 2024-01-09 21:19:49.000000000 +0000 @@ -30,7 +30,7 @@ exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd \ sun/security/mscapi java/util/stream java/util/Arrays/largeMemory \ java/util/BitSet/stream javax/rmi java/net/httpclient/websocket \ -sanity/client +sanity/client sun/tools/jhsdb # Group definitions groups=TEST.groups diff -Nru openjdk-lts-11.0.21+9/test/jdk/TEST.groups openjdk-lts-11.0.22+7/test/jdk/TEST.groups --- openjdk-lts-11.0.21+9/test/jdk/TEST.groups 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/TEST.groups 2024-01-09 21:19:49.000000000 +0000 @@ -376,6 +376,8 @@ jdk_imageio = \ javax/imageio +jdk_accessibility = + jfc_demo = \ demo/jfc @@ -383,14 +385,33 @@ jdk/editpad jdk_desktop = \ - :jdk_awt \ - :jdk_2d \ - :jdk_beans \ + :jdk_desktop_part1 \ + :jdk_desktop_part2 \ + :jdk_desktop_part3 + +jdk_desktop_part1 = \ + :jdk_client_sanity \ :jdk_swing \ + :jdk_2d \ :jdk_sound \ :jdk_imageio \ + :jdk_editpad \ :jfc_demo \ - :jdk_editpad + :jdk_accessibility \ + :jdk_beans + +jdk_desktop_part2 = \ + :jdk_awt \ + -java/awt/Component \ + -java/awt/Modal \ + -java/awt/datatransfer \ + -java/awt/Window + +jdk_desktop_part3 = \ + java/awt/Component \ + java/awt/Modal \ + java/awt/datatransfer \ + java/awt/Window # SwingSet3 tests. jdk_client_sanity = \ diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/JdbOptions.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/JdbOptions.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/JdbOptions.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/JdbOptions.java 2024-01-09 21:19:49.000000000 +0000 @@ -34,9 +34,17 @@ import lib.jdb.JdbCommand; import jdk.test.lib.process.OutputAnalyzer; +import java.io.IOException; +import java.io.PrintStream; import java.lang.management.ManagementFactory; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.Arrays; import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; class JbdOptionsTarg { static final String OK_MSG = "JbdOptionsTarg: OK"; @@ -49,47 +57,62 @@ return "prop[" + name + "] = >" + value + "<"; } - public static void main(String[] args) { - System.out.println(OK_MSG); - // print all args - List vmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments(); - for (String s: vmArgs) { - System.out.println(argString(s)); - } - // print requested sys.props - for (String p: args) { - System.out.println(propString(p, System.getProperty(p))); + /** + * 1st argument is a filename to redirect application output, + * the rest are names of the properties to dump. + */ + public static void main(String[] args) throws IOException { + String outFile = args[0]; + try (PrintStream out = new PrintStream(outFile, StandardCharsets.UTF_8)) { + out.println(OK_MSG); + // print all args + List vmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments(); + for (String s : vmArgs) { + out.println(argString(s)); + } + // print requested sys.props (skip 1st arg which is output filename) + for (int i=1; i < args.length; i++) { + String p = args[i]; + out.println(propString(p, System.getProperty(p))); + } } } } public class JdbOptions { + private static final String outFilename = UUID.randomUUID().toString() + ".out"; + private static final Path outPath = Paths.get(outFilename); private static final String targ = JbdOptionsTarg.class.getName(); public static void main(String[] args) throws Exception { // the simplest case test("-connect", - "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-client -XX:+PrintVMOptions,main=" + targ) + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-client -XX:+PrintVMOptions" + + ",main=" + targ + " " + outFilename) .expectedArg("-XX:+PrintVMOptions"); // pass property through 'options' test("-connect", - "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo',main=" + targ + " boo") + "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo'" + + ",main=" + targ + " " + outFilename + " boo") .expectedProp("boo", "foo"); // property with spaces test("-connect", - "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-Dboo=foo 2\",main=" + targ + " boo") + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-Dboo=foo 2\"" + + ",main=" + targ + " " + outFilename + " boo") .expectedProp("boo", "foo 2"); // property with spaces (with single quotes) test("-connect", - "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo 2',main=" + targ + " boo") + "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo 2'" + + ",main=" + targ + " " + outFilename + " boo") .expectedProp("boo", "foo 2"); // properties with spaces (with single quotes) test("-connect", - "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-Dboo=foo '-Dboo2=foo 2',main=" + targ + " boo boo2") + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-Dboo=foo '-Dboo2=foo 2'" + + ",main=" + targ + " " + outFilename + " boo boo2") .expectedProp("boo", "foo") .expectedProp("boo2", "foo 2"); @@ -98,7 +121,7 @@ "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-client\" \"-XX:+PrintVMOptions\"" + " -XX:+IgnoreUnrecognizedVMOptions" + " \"-XX:StartFlightRecording=dumponexit=true,maxsize=500M\" \"-XX:FlightRecorderOptions=repository=jfrrep\"" - + ",main=" + targ) + + ",main=" + targ + " " + outFilename) .expectedArg("-XX:StartFlightRecording=dumponexit=true,maxsize=500M") .expectedArg("-XX:FlightRecorderOptions=repository=jfrrep"); @@ -107,7 +130,7 @@ "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-client' '-XX:+PrintVMOptions'" + " -XX:+IgnoreUnrecognizedVMOptions" + " '-XX:StartFlightRecording=dumponexit=true,maxsize=500M' '-XX:FlightRecorderOptions=repository=jfrrep'" - + ",main=" + targ) + + ",main=" + targ + " " + outFilename) .expectedArg("-XX:StartFlightRecording=dumponexit=true,maxsize=500M") .expectedArg("-XX:FlightRecorderOptions=repository=jfrrep"); @@ -120,7 +143,7 @@ + " -XX:+IgnoreUnrecognizedVMOptions" + " \"-XX:StartFlightRecording=dumponexit=true,maxsize=500M\"" + " '-XX:FlightRecorderOptions=repository=jfrrep'" - + ",main=" + targ + " prop1 prop2 prop3 prop4") + + ",main=" + targ + " " + outFilename + " prop1 prop2 prop3 prop4") .expectedProp("prop1", "val1") .expectedProp("prop2", "val 2") .expectedProp("prop3", "val3") @@ -154,12 +177,18 @@ .map(s -> s.replace("\"", "\\\"")) .toArray(String[]::new); } + try (Jdb jdb = new Jdb(args)) { jdb.waitForSimplePrompt(1024, true); // 1024 lines should be enough jdb.command(JdbCommand.run().allowExit()); - OutputAnalyzer out = new OutputAnalyzer(jdb.getJdbOutput()); - out.shouldContain(JbdOptionsTarg.OK_MSG); - return new TestResult(out); } + String output = Files.readAllLines(outPath, StandardCharsets.UTF_8).stream() + .collect(Collectors.joining(System.getProperty("line.separator"))); + Files.deleteIfExists(outPath); + System.out.println("Debuggee output: ["); + System.out.println(output); + System.out.println("]"); + OutputAnalyzer out = new OutputAnalyzer(output); + return new TestResult(out); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/JdwpOnThrowTest.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/JdwpOnThrowTest.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/JdwpOnThrowTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/JdwpOnThrowTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2023 SAP SE. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.jdi.Bootstrap; +import com.sun.jdi.VirtualMachine; +import com.sun.jdi.connect.AttachingConnector; +import com.sun.jdi.connect.Connector; +import com.sun.jdi.connect.IllegalConnectorArgumentsException; +import com.sun.jdi.event.EventIterator; +import com.sun.jdi.event.EventQueue; +import com.sun.jdi.event.EventSet; +import com.sun.jdi.event.Event; +import com.sun.jdi.event.ExceptionEvent; +import lib.jdb.Debuggee; + +import java.io.IOException; +import java.net.ServerSocket; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/* + * @test + * @bug 8317920 + * @summary Tests for JDWP agent to send valid exception event with onthrow option + * @library /test/lib + * + * @build ThrowCaughtException JdwpOnThrowTest + * @run main/othervm JdwpOnThrowTest + */ +public class JdwpOnThrowTest { + + private static long TIMEOUT = 10000; + + private static String ATTACH_CONNECTOR = "com.sun.jdi.SocketAttach"; + // cache socket attaching connector + private static AttachingConnector attachingConnector; + + public static void main(String[] args) throws Exception { + int port = findFreePort(); + try (Debuggee debuggee = Debuggee.launcher("ThrowCaughtException").setAddress("localhost:" + port) + .enableOnThrow("Ex", "Start").setSuspended(true).launch()) { + VirtualMachine vm = null; + try { + vm = attach("localhost", "" + port); + EventQueue queue = vm.eventQueue(); + log("Waiting for exception event"); + long start = System.currentTimeMillis(); + while (start + TIMEOUT > System.currentTimeMillis()) { + EventSet eventSet = queue.remove(TIMEOUT); + EventIterator eventIterator = eventSet.eventIterator(); + while(eventIterator.hasNext() && start + TIMEOUT > System.currentTimeMillis()) { + Event event = eventIterator.next(); + if (event instanceof ExceptionEvent) { + ExceptionEvent ex = (ExceptionEvent)event; + verifyExceptionEvent(ex); + log("Received exception event: " + event); + vm.dispose(); + return; + } + log("Received event: " + event); + } + } + throw new RuntimeException("ERROR: failed to receive exception event"); + } catch (IOException ex) { + throw new RuntimeException("ERROR: failed to attach", ex); + } + } + } + + private static void verifyExceptionEvent(ExceptionEvent ex) throws Exception { + if (ex.exception() == null) { + throw new RuntimeException("Exception is null"); + } + if (ex.exception().type() == null) { + throw new RuntimeException("Exception type is null"); + } + if (ex.exception().referenceType() == null) { + throw new RuntimeException("Exception reference type is null"); + } + if (ex.catchLocation() == null) { + throw new RuntimeException("Exception catch location is null"); + } + if (!ex.location().equals(ex.thread().frame(0).location())) { + throw new RuntimeException( + String.format("Throw location %s and location of first frame %s are not equal", + ex.location(), ex.thread().frame(0).location())); + } + if (!ex.exception().type().name().equals("Ex")) { + throw new RuntimeException("Exception has wrong type: " + ex.exception().type().name()); + } + } + + private static int findFreePort() { + try (ServerSocket socket = new ServerSocket(0)) { + return socket.getLocalPort(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static VirtualMachine attach(String address, String port) throws IOException { + if (attachingConnector == null) { + attachingConnector = (AttachingConnector)getConnector(ATTACH_CONNECTOR); + } + Map args = attachingConnector.defaultArguments(); + setConnectorArg(args, "hostname", address); + setConnectorArg(args, "port", port); + try { + return attachingConnector.attach(args); + } catch (IllegalConnectorArgumentsException e) { + // unexpected.. wrap in RuntimeException + throw new RuntimeException(e); + } + } + + private static Connector getConnector(String name) { + for (Connector connector : Bootstrap.virtualMachineManager().allConnectors()) { + if (connector.name().equalsIgnoreCase(name)) { + return connector; + } + } + throw new IllegalArgumentException("Connector " + name + " not found"); + } + + private static void setConnectorArg(Map args, String name, String value) { + Connector.Argument arg = args.get(name); + if (arg == null) { + throw new IllegalArgumentException("Argument " + name + " is not defined"); + } + arg.setValue(value); + } + + private static void log(Object o) { + System.out.println(String.valueOf(o)); + } + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/ThrowCaughtException.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/ThrowCaughtException.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/ThrowCaughtException.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/ThrowCaughtException.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2023 SAP SE. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + public class ThrowCaughtException { + public static void main(String args[]) throws Exception { + try { + System.out.println("Start"); + throw new Ex(); + } catch (Exception e) { + System.out.println(e); + } + } +} + +class Ex extends RuntimeException { +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/lib/jdb/Debuggee.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/lib/jdb/Debuggee.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jdi/lib/jdb/Debuggee.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jdi/lib/jdb/Debuggee.java 2024-01-09 21:19:49.000000000 +0000 @@ -68,6 +68,9 @@ private String transport = "dt_socket"; private String address = null; private boolean suspended = true; + private String onthrow = ""; + private boolean waitForPortPrint = true; + private String expectedOutputBeforeThrow = ""; private Launcher(String mainClass) { this.mainClass = mainClass; @@ -96,18 +99,28 @@ return this; } + // required to pass non null port with address and emit string before the throw + public Launcher enableOnThrow(String value, String expectedOutputBeforeThrow) { + this.onthrow = value; + this.waitForPortPrint = false; + this.expectedOutputBeforeThrow = expectedOutputBeforeThrow; + return this; + } + public ProcessBuilder prepare() { List debuggeeArgs = new LinkedList<>(); + String onthrowArgs = onthrow.isEmpty() ? "" : ",onthrow=" + onthrow + ",launch=exit"; debuggeeArgs.add("-agentlib:jdwp=transport=" + transport + (address == null ? "" : ",address=" + address) - + ",server=y,suspend=" + (suspended ? "y" : "n")); + + ",server=y,suspend=" + (suspended ? "y" : "n") + + onthrowArgs); debuggeeArgs.addAll(options); debuggeeArgs.add(mainClass); return ProcessTools.createTestJvm(debuggeeArgs); } public Debuggee launch(String name) { - return new Debuggee(prepare(), name); + return new Debuggee(prepare(), name, waitForPortPrint, expectedOutputBeforeThrow); } public Debuggee launch() { return launch("debuggee"); @@ -115,10 +128,22 @@ } // starts the process, waits for "Listening for transport" output and detects transport/address - private Debuggee(ProcessBuilder pb, String name) { + private Debuggee(ProcessBuilder pb, String name, boolean waitForPortPrint, String expectedOutputBeforeThrow) { // debuggeeListen[0] - transport, debuggeeListen[1] - address String[] debuggeeListen = new String[2]; Pattern listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at address: \\b(.+)\\b"); + if (!waitForPortPrint) { + try { + p = ProcessTools.startProcess(name, pb, s -> {output.add(s);}, s -> { + return s.equals(expectedOutputBeforeThrow); + }, 30, TimeUnit.SECONDS); + } catch (IOException | InterruptedException | TimeoutException ex) { + throw new RuntimeException("failed to launch debuggee", ex); + } + transport = null; + address = null; + return; + } try { p = ProcessTools.startProcess(name, pb, s -> output.add(s), // output consumer @@ -167,10 +192,16 @@ } String getTransport() { + if (transport == null) { + throw new IllegalStateException("transport is not available"); + } return transport; } public String getAddress() { + if (address == null) { + throw new IllegalStateException("address is not available"); + } return address; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/CheckAccess.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/CheckAccess.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/CheckAccess.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/CheckAccess.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -38,7 +38,7 @@ public class CheckAccess { public static final void main(String[] args) throws Exception { try { - Class clazz = Class.forName("com.sun.jndi.dns.DnsContext"); + Class clazz = Class.forName("com.sun.jndi.dns.DnsContext"); Field field = clazz.getField("debug"); if (Modifier.isPublic(field.getModifiers())) { throw new Exception( diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/AddInherited.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/AddInherited.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/AddInherited.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/AddInherited.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -55,8 +55,8 @@ Context child = (Context) context().lookup(getKey()); - Hashtable envParent = context().getEnvironment(); - Hashtable envChild = child.getEnvironment(); + Hashtable envParent = context().getEnvironment(); + Hashtable envChild = child.getEnvironment(); DNSTestUtils.debug(child); DNSTestUtils.debug("Parent env: " + envParent); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/GetEnv.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/GetEnv.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/GetEnv.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/GetEnv.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -53,8 +53,8 @@ Context child = (Context) context().lookup(getKey()); - Hashtable envParent = context().getEnvironment(); - Hashtable envChild = child.getEnvironment(); + Hashtable envParent = context().getEnvironment(); + Hashtable envChild = child.getEnvironment(); DNSTestUtils.debug(child); DNSTestUtils.debug("Parent env: " + envParent); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/RemoveInherited.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/RemoveInherited.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/RemoveInherited.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/RemoveInherited.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -67,8 +67,8 @@ Context child = (Context) context().lookup(getKey()); - Hashtable envParent = context().getEnvironment(); - Hashtable envChild = child.getEnvironment(); + Hashtable envParent = context().getEnvironment(); + Hashtable envChild = child.getEnvironment(); DNSTestUtils.debug(child); DNSTestUtils.debug("Parent env: " + envParent); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextAdd.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextAdd.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextAdd.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextAdd.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -57,8 +57,8 @@ addToEnvAndVerifyOldValIsNull(child, "some.irrelevant.property", "somevalue"); - Hashtable envParent = context().getEnvironment(); - Hashtable envChild = child.getEnvironment(); + Hashtable envParent = context().getEnvironment(); + Hashtable envChild = child.getEnvironment(); DNSTestUtils.debug(child); DNSTestUtils.debug("Parent env: " + envParent); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextRemove.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextRemove.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextRemove.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/EnvTests/SubcontextRemove.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -62,8 +62,8 @@ + val); } - Hashtable envParent = context().getEnvironment(); - Hashtable envChild = child.getEnvironment(); + Hashtable envParent = context().getEnvironment(); + Hashtable envChild = child.getEnvironment(); DNSTestUtils.debug(child); DNSTestUtils.debug("Parent env: " + envParent); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FactoryTests/TestDnsObject.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FactoryTests/TestDnsObject.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FactoryTests/TestDnsObject.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FactoryTests/TestDnsObject.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -31,7 +31,7 @@ public TestDnsObject(Attribute attr) { StringBuilder buf = new StringBuilder(); try { - NamingEnumeration enumObj = attr.getAll(); + NamingEnumeration enumObj = attr.getAll(); while (enumObj.hasMore()) { buf.append(enumObj.next()); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListFedBase.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListFedBase.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListFedBase.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListFedBase.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -46,7 +46,7 @@ * @param expectedCount given expected count * @throws NamingException */ - public void verifyNamingEnumeration(NamingEnumeration enumObj, + public void verifyNamingEnumeration(NamingEnumeration enumObj, int expectedCount) throws NamingException { DNSTestUtils.debug("Enum is: " + enumObj); @@ -54,7 +54,7 @@ Binding res; while (enumObj.hasMore()) { - res = (Binding) enumObj.next(); + res = enumObj.next(); DNSTestUtils.debug(res); ++count; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListNns.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListNns.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListNns.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListNns.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.Binding; import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -52,7 +53,7 @@ env().put(Context.OBJECT_FACTORIES, "FedObjectFactory"); setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().listBindings(getKey() + "/"); + NamingEnumeration enumObj = context().listBindings(getKey() + "/"); verifyNamingEnumeration(enumObj, COUNT_LIMIT); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListSubInterior.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListSubInterior.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListSubInterior.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListSubInterior.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.Binding; import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -54,7 +55,7 @@ env().put(Context.OBJECT_FACTORIES, "FedObjectFactory"); setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().listBindings(getKey() + "/a/b"); + NamingEnumeration enumObj = context().listBindings(getKey() + "/a/b"); verifyNamingEnumeration(enumObj, COUNT_LIMIT); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListSubLeaf.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListSubLeaf.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/FedTests/ListSubLeaf.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/FedTests/ListSubLeaf.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.Binding; import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -54,7 +55,7 @@ env().put(Context.OBJECT_FACTORIES, "FedObjectFactory"); setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().listBindings(getKey() + "/a/b/c"); + NamingEnumeration enumObj = context().listBindings(getKey() + "/a/b/c"); verifyNamingEnumeration(enumObj, COUNT_LIMIT); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsInteriorNotFound.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsInteriorNotFound.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsInteriorNotFound.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsInteriorNotFound.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.Binding; import javax.naming.NameNotFoundException; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -52,7 +53,7 @@ @Override public void runTest() throws Exception { setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().listBindings(getKey()); + NamingEnumeration enumObj = context().listBindings(getKey()); DNSTestUtils.debug("Enum is: " + enumObj); throw new RuntimeException("Failed: expecting NameNotFoundException"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsLeafNotFound.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsLeafNotFound.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsLeafNotFound.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListBindingsLeafNotFound.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.Binding; import javax.naming.NameNotFoundException; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -52,7 +53,7 @@ @Override public void runTest() throws Exception { setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().listBindings(getKey()); + NamingEnumeration enumObj = context().listBindings(getKey()); DNSTestUtils.debug("Enum is: " + enumObj); throw new RuntimeException("Failed: expecting NameNotFoundException"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListInteriorNotFound.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListInteriorNotFound.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListInteriorNotFound.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListInteriorNotFound.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.NameClassPair; import javax.naming.NameNotFoundException; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -52,7 +53,7 @@ @Override public void runTest() throws Exception { setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().list(getKey()); + NamingEnumeration enumObj = context().list(getKey()); DNSTestUtils.debug("Enum is: " + enumObj); throw new RuntimeException("Failed: expecting NameNotFoundException"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListLeafNotFound.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListLeafNotFound.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/dns/ListTests/ListLeafNotFound.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/dns/ListTests/ListLeafNotFound.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,6 +21,7 @@ * questions. */ +import javax.naming.NameClassPair; import javax.naming.NameNotFoundException; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; @@ -52,7 +53,7 @@ @Override public void runTest() throws Exception { setContext(new InitialDirContext(env())); - NamingEnumeration enumObj = context().list(getKey()); + NamingEnumeration enumObj = context().list(getKey()); DNSTestUtils.debug("Enum is: " + enumObj); throw new RuntimeException("Failed: expecting NameNotFoundException"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -103,7 +103,7 @@ } // set up the environment for creating the initial context - Hashtable env = new Hashtable(); + Hashtable env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:" + serverPort); @@ -121,7 +121,7 @@ scs.setSearchScope(SearchControls.SUBTREE_SCOPE); try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", "(&(cn=Bob)))", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception. @@ -132,7 +132,7 @@ } try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", ")(&(cn=Bob)", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception. @@ -143,7 +143,7 @@ } try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", "(&(cn=Bob))", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception. diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/Base64Test.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/Base64Test.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/Base64Test.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/Base64Test.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -180,7 +180,7 @@ * in an LDAP directory. */ private static void storeObjectInLDAP() { - Hashtable env = new Hashtable(); + Hashtable env = new Hashtable<>(); env.put(Context.REFERRAL, "follow"); // omit an LDAP control env.put("java.naming.ldap.version", "3"); // omit LDAP bind operation env.put("com.sun.jndi.ldap.trace.ber", System.err); // dump protocol diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -52,14 +52,14 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; -class DeadServerTimeoutSSLTest implements Callable { +class DeadServerTimeoutSSLTest implements Callable { - Hashtable env; + Hashtable env; DeadSSLServer server; boolean passed = false; private int HANGING_TEST_TIMEOUT = 20_000; - public DeadServerTimeoutSSLTest(Hashtable env) throws IOException { + public DeadServerTimeoutSSLTest(Hashtable env) throws IOException { this.server = new DeadSSLServer(); this.env = env; } @@ -106,7 +106,7 @@ public Boolean call() { InitialContext ctx = null; - ScheduledFuture killer = null; + ScheduledFuture killer = null; long start = System.nanoTime(); try { @@ -174,8 +174,8 @@ public class DeadSSLLdapTimeoutTest { - static Hashtable createEnv() { - Hashtable env = new Hashtable(11); + static Hashtable createEnv() { + Hashtable env = new Hashtable<>(11); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); return env; @@ -194,7 +194,7 @@ // this should exit with a SocketTimeoutException as the root cause // it should also use the connect timeout instead of the read timeout System.out.println("Running connect timeout test with 10ms connect timeout, 3000ms read timeout & SSL"); - Hashtable sslenv = createEnv(); + Hashtable sslenv = createEnv(); sslenv.put("com.sun.jndi.ldap.connect.timeout", "10"); sslenv.put("com.sun.jndi.ldap.read.timeout", "3000"); sslenv.put(Context.SECURITY_PROTOCOL, "ssl"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/InvalidLdapFilters.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/InvalidLdapFilters.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/InvalidLdapFilters.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/InvalidLdapFilters.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -192,7 +192,7 @@ scs.setSearchScope(SearchControls.SUBTREE_SCOPE); try { - NamingEnumeration answer = + NamingEnumeration answer = context.search("o=sun,c=us", searchFilter, scs); } catch (InvalidSearchFilterException isfe) { if (filterIsValid) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/LdapName/EmptyNameSearch.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/LdapName/EmptyNameSearch.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/LdapName/EmptyNameSearch.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/LdapName/EmptyNameSearch.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -70,7 +70,7 @@ Thread.sleep(3000); // Setup JNDI parameters - Hashtable env = new Hashtable(); + Hashtable env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, URIBuilder.newBuilder() @@ -86,7 +86,7 @@ DirContext ctx = new InitialDirContext(env); System.out.println("Client: performing search..."); - ctx.search(new LdapName(Collections.EMPTY_LIST), "cn=*", null); + ctx.search(new LdapName(Collections.emptyList()), "cn=*", null); ctx.close(); // Exit diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/LdapSSLHandshakeFailureTest.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/LdapSSLHandshakeFailureTest.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/LdapSSLHandshakeFailureTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/LdapSSLHandshakeFailureTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.net.URIBuilder; + +import javax.naming.Context; +import javax.naming.ldap.InitialLdapContext; +import javax.naming.ldap.LdapContext; +import javax.net.SocketFactory; +import javax.net.ssl.SSLServerSocketFactory; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketException; +import java.util.Hashtable; + +/* + * @test + * @bug 8314063 + * @library /test/lib + * @summary For LDAPs connection, if the value of com.sun.jndi.ldap.connect.timeout is + * set too small or not an optimal value for the system, after the socket is created and + * connected to the server, but the handshake between the client and server fails due to + * socket time out, the opened socket is not closed properly. In this test case, the server + * is forced to sleep ten seconds and connection time out for client is one second. This + * will allow the socket opened and connected, and give the chance for the handshake to be + * timed out. Before this fix, the socket is kept opened. Right now the exception will be + * caught and the socket will be closed. + * + * @run main/othervm LdapSSLHandshakeFailureTest LdapSSLHandshakeFailureTest$CustomSocketFactory true 6000 + * @run main/othervm LdapSSLHandshakeFailureTest -1000 true 6000 + * @run main/othervm LdapSSLHandshakeFailureTest -1000 false 6000 + * @run main/othervm LdapSSLHandshakeFailureTest 2000 false 6000 + * @run main/othervm LdapSSLHandshakeFailureTest 0 true 6000 + * @run main/othervm LdapSSLHandshakeFailureTest 0 false 6000 + * @run main/othervm LdapSSLHandshakeFailureTest true + * @run main/othervm LdapSSLHandshakeFailureTest false + */ + +public class LdapSSLHandshakeFailureTest { + private static String SOCKET_CLOSED_MSG = "The socket has been closed."; + + private static int serverSleepingTime = 5000; + + public static void main(String args[]) throws Exception { + + // Set the keystores + setKeyStore(); + boolean serverSlowDown = Boolean.valueOf(args[0]); + if (args.length == 2) { + serverSlowDown = Boolean.valueOf(args[1]); + } + + if (args.length == 3) { + serverSleepingTime = Integer.valueOf(args[2]); + } + + boolean hasCustomSocketFactory = args[0] + .equals("LdapSSLHandshakeFailureTest$CustomSocketFactory"); + // start the test server first. + try (TestServer server = new TestServer(serverSlowDown, serverSleepingTime)) { + server.start(); + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); + env.put("java.naming.ldap.version", "3"); + env.put(Context.PROVIDER_URL, URIBuilder.newBuilder() + .scheme("ldaps") + .loopback() + .port(server.getPortNumber()) + .buildUnchecked().toString()); + + if (hasCustomSocketFactory) { + env.put("java.naming.ldap.factory.socket", args[0]); + env.put("com.sun.jndi.ldap.connect.timeout", "1000"); + } + + if (args.length == 2 && !hasCustomSocketFactory) { + env.put("com.sun.jndi.ldap.connect.timeout", args[0]); + } + + env.put(Context.SECURITY_PROTOCOL, "ssl"); + env.put(Context.SECURITY_AUTHENTICATION, "Simple"); + env.put(Context.SECURITY_PRINCIPAL, "cn=principal"); + env.put(Context.SECURITY_CREDENTIALS, "123456"); + LdapContext ctx = null; + try { + ctx = new InitialLdapContext(env, null); + } catch (Exception e) { + if (CustomSocketFactory.customSocket.closeMethodCalledCount() > 0 + && hasCustomSocketFactory + && Boolean.valueOf(args[1])) { + System.out.println(SOCKET_CLOSED_MSG); + } else { + throw e; + } + } finally { + if (ctx != null) + ctx.close(); + } + } + } + + public static class CustomSocketFactory extends SocketFactory { + private static CustomSocket customSocket; + + public static CustomSocketFactory getDefault() { + return new CustomSocketFactory(); + } + + @Override + public Socket createSocket() throws SocketException { + customSocket = new CustomSocket(); + return customSocket; + } + + @Override + public Socket createSocket(String s, int timeout) { + return customSocket; + } + + @Override + public Socket createSocket(String host, int port, InetAddress localHost, + int localPort) { + return customSocket; + } + + @Override + public Socket createSocket(InetAddress host, int port) { + return customSocket; + } + + @Override + public Socket createSocket(InetAddress address, int port, + InetAddress localAddress, int localPort) { + return customSocket; + } + } + + private static class CustomSocket extends Socket { + private int closeMethodCalled = 0; + + public CustomSocket() { + closeMethodCalled = 0; + } + + public int closeMethodCalledCount() { + return closeMethodCalled; + } + + @Override + public void close() throws java.io.IOException { + closeMethodCalled++; + super.close(); + } + } + + private static void setKeyStore() { + + String fileName = "ksWithSAN", dir = System.getProperty("test.src", ".") + File.separator; + + System.setProperty("javax.net.ssl.keyStore", dir + fileName); + System.setProperty("javax.net.ssl.keyStorePassword", "welcome1"); + System.setProperty("javax.net.ssl.trustStore", dir + fileName); + System.setProperty("javax.net.ssl.trustStorePassword", "welcome1"); + } + + static class TestServer extends Thread implements AutoCloseable { + private boolean isForceToSleep; + private int sleepingTime; + private final ServerSocket serverSocket; + private final int PORT; + + private TestServer(boolean isForceToSleep, int sleepingTime) { + this.isForceToSleep = isForceToSleep; + this.sleepingTime = sleepingTime; + try { + SSLServerSocketFactory socketFactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); + serverSocket = socketFactory.createServerSocket(0, 0, InetAddress.getLoopbackAddress()); + PORT = serverSocket.getLocalPort(); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + setDaemon(true); + } + + public int getPortNumber() { + return PORT; + } + + @Override + public void run() { + try (Socket socket = serverSocket.accept(); + InputStream in = socket.getInputStream(); + OutputStream out = socket.getOutputStream()) { + if (isForceToSleep) { + Thread.sleep(sleepingTime); + } + byte[] bindResponse = {0x30, 0x0C, 0x02, 0x01, 0x01, 0x61, 0x07, 0x0A, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00}; + // read the bindRequest + while (in.read() != -1) { + in.skip(in.available()); + break; + } + out.write(bindResponse); + out.flush(); + // ignore the further requests + while (in.read() != -1) { + in.skip(in.available()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void close() throws Exception { + if (serverSocket != null) { + serverSocket.close(); + } + } + } +} + diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/NoWaitForReplyTest.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/NoWaitForReplyTest.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/NoWaitForReplyTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/NoWaitForReplyTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -43,7 +43,7 @@ var ldapServer = new BaseLdapServer().start(); // Set up the environment for creating the initial context - Hashtable env = new Hashtable(11); + Hashtable env = new Hashtable<>(11); env.put(Context.PROVIDER_URL, URIBuilder.newBuilder() .scheme("ldap") .loopback() @@ -71,7 +71,7 @@ SearchControls scl = new SearchControls(); scl.setSearchScope(SearchControls.SUBTREE_SCOPE); System.out.println("Client: performing search"); - NamingEnumeration answer = + NamingEnumeration answer = ctx.search("ou=People,o=JNDITutorial", "(objectClass=*)", scl); // Server will never reply: either we waited in the call above until diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/SocketCloseTest.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/SocketCloseTest.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/SocketCloseTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/SocketCloseTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import javax.naming.Context; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import javax.net.SocketFactory; +import java.net.InetAddress; +import java.net.Socket; +import java.net.SocketAddress; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Hashtable; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +/* + * @test + * @bug 8313657 + * @summary make sure socket is closed when the error happens for OutputStream flushing + * The value of provider url can be random, not necessary to be the one in the code + * @library /test/lib + * @run main/othervm SocketCloseTest + */ + +public class SocketCloseTest { + public static String SOCKET_CLOSED_MSG = "The socket has been closed."; + public static String SOCKET_NOT_CLOSED_MSG = "The socket was not closed."; + public static String BAD_FLUSH = "Bad flush!"; + private static final byte[] BIND_RESPONSE = new byte[]{ + 48, 12, 2, 1, 1, 97, 7, 10, 1, 0, 4, 0, 4, 0 + }; + + public static void main(String[] args) throws Exception { + SocketCloseTest scTest = new SocketCloseTest(); + scTest.runCloseSocketScenario(); + } + + public void runCloseSocketScenario() throws Exception { + Hashtable props = new Hashtable<>(); + + props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); + props.put(Context.PROVIDER_URL, "ldap://localhost:1389/o=example"); + props.put("java.naming.ldap.factory.socket", CustomSocketFactory.class.getName()); + try { + final DirContext ctx = new InitialDirContext(props); + } catch (Exception e) { + if (CustomSocketFactory.customSocket.closeMethodCalledCount() > 0) { + System.out.println(SOCKET_CLOSED_MSG); + } else { + System.out.println(SOCKET_NOT_CLOSED_MSG); + throw e; + } + } + } + + public static class CustomSocketFactory extends SocketFactory { + public static CustomSocket customSocket = new CustomSocket(); + + public static CustomSocketFactory getDefault() { + return new CustomSocketFactory(); + } + + @Override + public Socket createSocket() { + return customSocket; + } + + @Override + public Socket createSocket(String s, int timeout) { + return customSocket; + } + + @Override + public Socket createSocket(String host, int port, InetAddress localHost, + int localPort) { + return customSocket; + } + + @Override + public Socket createSocket(InetAddress host, int port) { + return customSocket; + } + + @Override + public Socket createSocket(InetAddress address, int port, + InetAddress localAddress, int localPort) { + return customSocket; + } + } + + private static class LdapInputStream extends InputStream { + private ByteArrayInputStream bos; + + public LdapInputStream() { + } + + @Override + public int read() throws IOException { + bos = new ByteArrayInputStream(BIND_RESPONSE); + return bos.read(); + } + } + + private static class LdapOutputStream extends OutputStream { + + @Override + public void write(int b) throws IOException { + System.out.println("output stream writing"); + } + + @Override + public void flush() throws IOException { + System.out.println(BAD_FLUSH); + throw new IOException(BAD_FLUSH); + } + } + + private static class CustomSocket extends Socket { + private int closeMethodCalled = 0; + private LdapOutputStream output = new LdapOutputStream(); + private LdapInputStream input = new LdapInputStream(); + + public void connect(SocketAddress address, int timeout) { + } + + public InputStream getInputStream() { + return input; + } + + public OutputStream getOutputStream() { + return output; + } + + public int closeMethodCalledCount() { + return closeMethodCalled; + } + + @Override + public void close() throws IOException { + closeMethodCalled++; + super.close(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -40,6 +40,7 @@ import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; import java.net.ServerSocket; import java.util.Hashtable; @@ -99,7 +100,7 @@ SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.OBJECT_SCOPE); - NamingEnumeration results = ctx + NamingEnumeration results = ctx .search(entryDN, "(objectclass=*)", constraints); int found = LDAPTestUtils.checkResult(results, expect); Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/com/sun/jndi/ldap/ksWithSAN and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/com/sun/jndi/ldap/ksWithSAN differ diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/TestLogging.java openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/TestLogging.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/TestLogging.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/TestLogging.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -93,7 +93,7 @@ System.out.println ("caught expected exception"); } - Socket s = new Socket ("127.0.0.1", p1); + Socket s = new Socket (InetAddress.getLoopbackAddress(), p1); OutputStream os = s.getOutputStream(); //os.write ("GET xxx HTTP/1.1\r\n".getBytes()); os.write ("HELLO WORLD\r\n".getBytes()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java 2024-01-09 21:19:49.000000000 +0000 @@ -105,7 +105,7 @@ static void test1() throws IOException { failed = false; - Socket s = new Socket ("127.0.0.1", port); + Socket s = new Socket (InetAddress.getLoopbackAddress(), port); InputStream is = s.getInputStream(); // server should close connection after 2 seconds. We wait up to 10 s.setSoTimeout (10000); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/B6361557.java openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/B6361557.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/B6361557.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/B6361557.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -69,7 +69,8 @@ public static void main (String[] args) throws Exception { Handler handler = new Handler(); - InetSocketAddress addr = new InetSocketAddress (0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress addr = new InetSocketAddress (loopback, 0); HttpServer server = HttpServer.create (addr, 0); HttpContext ctx = server.createContext ("/test", handler); @@ -78,7 +79,7 @@ server.start (); InetSocketAddress destaddr = new InetSocketAddress ( - "127.0.0.1", server.getAddress().getPort() + loopback, server.getAddress().getPort() ); System.out.println ("destaddr " + destaddr); @@ -86,7 +87,10 @@ int requests = 0; int responses = 0; while (true) { - int selres = selector.select (1); + // we need to read responses from time to time: slightly + // increase the timeout with the amount of pending responses + // to give a chance to the server to reply. + int selres = selector.select (requests - responses + 1); Set selkeys = selector.selectedKeys(); for (SelectionKey key : selkeys) { if (key.isReadable()) { @@ -95,14 +99,18 @@ try { int x = chan.read(buf); if (x == -1 || responseComplete(buf)) { + System.out.print("_"); key.attach(null); chan.close(); responses++; } - } catch (IOException e) {} + } catch (IOException e) { + System.out.println(e); + } } } if (requests < NUM) { + System.out.print("."); SocketChannel schan = SocketChannel.open(destaddr); requestBuf.rewind(); int c = 0; diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/TruncatedRequestBody.java openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/TruncatedRequestBody.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/net/httpserver/bugs/TruncatedRequestBody.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/net/httpserver/bugs/TruncatedRequestBody.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, 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 @@ -34,6 +34,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.nio.charset.StandardCharsets; @@ -100,7 +101,7 @@ // Test 1: fixed length - Socket sock = new Socket("127.0.0.1", port); + Socket sock = new Socket(InetAddress.getLoopbackAddress(), port); String s1 = "POST /foo HTTP/1.1\r\nContent-length: 200000\r\n" + "\r\nfoo bar99"; @@ -114,7 +115,7 @@ String s2 = "POST /foo HTTP/1.1\r\nTransfer-encoding: chunked\r\n\r\n" + "100\r\nFoo bar"; - sock = new Socket("127.0.0.1", port); + sock = new Socket(InetAddress.getLoopbackAddress(), port); os = sock.getOutputStream(); os.write(s2.getBytes(StandardCharsets.ISO_8859_1)); Thread.sleep(500); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, 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 @@ -110,9 +110,10 @@ try { channel.close(); /* open a new unbound channel for test */ channel = SctpChannel.open(); - connectChannel(channel); - channel.bind(null); - fail("AlreadyConnectedException expected"); + try (var peer = connectChannel(channel)) { + channel.bind(null); + fail("AlreadyConnectedException expected"); + } } catch (AlreadyConnectedException unused) { pass(); } catch (IOException ioe) { unexpected(ioe); } @@ -264,7 +265,9 @@ } finally { try { if (channel != null) channel.close(); } catch (IOException ioe) { unexpected(ioe); } - } + try { if (peerChannel != null) peerChannel.close(); } + catch (IOException ioe) { unexpected(ioe); } + } } boolean boundAddress(SctpChannel channel, InetAddress addr) diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, 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 @@ -191,6 +191,9 @@ } } //for + try { sc.close(); } + catch (IOException ioe) { unexpected(ioe); } + } catch (IOException ioe) { unexpected(ioe); } catch (InterruptedException ie) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java 2024-01-09 21:19:49.000000000 +0000 @@ -61,11 +61,10 @@ void doTest() { SctpChannel channel = null; - SctpServerChannel ssc = null; - try { + try (SctpServerChannel ssc = SctpServerChannel.open()) { /* Create a server channel to connect to */ - ssc = SctpServerChannel.open().bind(null); + ssc.bind(null); Set addrs = ssc.getAllLocalAddresses(); if (addrs.isEmpty()) debug("addrs should not be empty"); @@ -209,8 +208,6 @@ } finally { try { if (channel != null) channel.close(); } catch (IOException unused) {} - try { if (ssc != null) ssc.close(); } - catch (IOException unused) {} } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java 2024-01-09 21:19:49.000000000 +0000 @@ -72,8 +72,7 @@ return; } - try { - SctpChannel sc = SctpChannel.open(); + try (SctpChannel sc = SctpChannel.open()) { /* check supported options */ Set> options = sc.supportedOptions(); @@ -143,8 +142,6 @@ /* SCTP_PRIMARY_ADDR */ void sctpPrimaryAddr() throws IOException { - SocketAddress addrToSet = null;; - System.out.println("TESTING SCTP_PRIMARY_ADDR"); SctpChannel sc = SctpChannel.open(); SctpServerChannel ssc = SctpServerChannel.open().bind(null); @@ -158,12 +155,11 @@ sc.connect(serverAddr); SctpChannel peerChannel = ssc.accept(); ssc.close(); - Set peerAddrs = peerChannel.getAllLocalAddresses(); - debug("Peer local Addresses: "); - for (Iterator it = peerAddrs.iterator(); it.hasNext(); ) { + Set remoteAddresses = sc.getRemoteAddresses(); + debug("Remote Addresses: "); + for (Iterator it = remoteAddresses.iterator(); it.hasNext(); ) { InetSocketAddress addr = (InetSocketAddress)it.next(); debug("\t" + addr); - addrToSet = addr; // any of the peer addresses will do! } /* retrieval of SCTP_PRIMARY_ADDR is not supported on Solaris */ @@ -176,25 +172,21 @@ } else { /* Linux */ SocketAddress primaryAddr = sc.getOption(SCTP_PRIMARY_ADDR); System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr); - /* Verify that this is one of the peer addresses */ - boolean found = false; - addrToSet = primaryAddr; // may not have more than one addr - for (Iterator it = peerAddrs.iterator(); it.hasNext(); ) { - InetSocketAddress addr = (InetSocketAddress)it.next(); - if (addr.equals(primaryAddr)) { - found = true; - } - addrToSet = addr; - } - check(found, "SCTP_PRIMARY_ADDR returned bogus address!"); + /* Verify that this is one of the remote addresses */ + check(remoteAddresses.contains(primaryAddr), "SCTP_PRIMARY_ADDR returned bogus address!"); - System.out.println("SCTP_PRIMARY_ADDR try set to: " + addrToSet); - sc.setOption(SCTP_PRIMARY_ADDR, addrToSet); - System.out.println("SCTP_PRIMARY_ADDR set to: " + addrToSet); - primaryAddr = sc.getOption(SCTP_PRIMARY_ADDR); - System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr); - check(addrToSet.equals(primaryAddr),"SCTP_PRIMARY_ADDR not set correctly"); + for (Iterator it = remoteAddresses.iterator(); it.hasNext(); ) { + InetSocketAddress addrToSet = (InetSocketAddress) it.next(); + System.out.println("SCTP_PRIMARY_ADDR try set to: " + addrToSet); + sc.setOption(SCTP_PRIMARY_ADDR, addrToSet); + System.out.println("SCTP_PRIMARY_ADDR set to : " + addrToSet); + primaryAddr = sc.getOption(SCTP_PRIMARY_ADDR); + System.out.println("SCTP_PRIMARY_ADDR returned : " + primaryAddr); + check(addrToSet.equals(primaryAddr), "SCTP_PRIMARY_ADDR not set correctly"); + } } + sc.close(); + peerChannel.close(); } //--------------------- Infrastructure --------------------------- boolean debug = true; diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java 2024-01-09 21:19:49.000000000 +0000 @@ -210,7 +210,8 @@ /* echo the message */ debug("Server: echoing first message"); buffer.flip(); - int bytes = serverChannel.send(buffer, info); + MessageInfo sendInfo = MessageInfo.createOutgoing(info.association(), null, 0); + int bytes = serverChannel.send(buffer, sendInfo); debug("Server: sent " + bytes + "bytes"); clientFinishedLatch.await(10L, TimeUnit.SECONDS); diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java 2024-01-09 21:19:49.000000000 +0000 @@ -276,7 +276,8 @@ /* echo the message */ debug("Server: echoing first message"); buffer.flip(); - int bytes = serverChannel.send(buffer, info); + MessageInfo sendInfo = MessageInfo.createOutgoing(assoc, null, info.streamNumber()); + int bytes = serverChannel.send(buffer, sendInfo); debug("Server: sent " + bytes + "bytes"); /* receive a large message */ @@ -302,7 +303,8 @@ /* echo the message */ debug("Server: echoing second message"); buffer.flip(); - bytes = serverChannel.send(buffer, info); + sendInfo = MessageInfo.createOutgoing(assoc, null, info.streamNumber()); + bytes = serverChannel.send(buffer, sendInfo); debug("Server: sent " + bytes + "bytes"); /* TEST 6 */ diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -28,6 +28,7 @@ import com.sun.nio.sctp.*; import java.io.IOException; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.ByteBuffer; @@ -36,7 +37,7 @@ public class SendFailed { - static final SocketAddress remoteAddress = new InetSocketAddress("127.0.0.1", 3000); + static final SocketAddress remoteAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(), 3000); static final int[] bufferSizes = { 20, 49, 50, 51, 100, 101, 1024, 1025, 4095, 4096, 4097, 8191, 8192, 8193}; @@ -97,14 +98,19 @@ new SendFailedNotificationHandler(); ByteBuffer recvBuffer = direct ? allocateDirect(recvBufferSize) : allocate((recvBufferSize)); - channel.receive(recvBuffer, null, handler); + MessageInfo info = channel.receive(recvBuffer, null, handler); + debug("receive returned info:" + info); - // verify sent buffer received by send failed notification - ByteBuffer buffer = handler.getSendFailedByteBuffer(); - check(buffer.remaining() == sent); - check(buffer.position() == 0); - check(buffer.limit() == sent); - assertSameContent(sendBuffer, handler.getSendFailedByteBuffer()); + if (handler.receivedSendFailed) { + // verify sent buffer received by send failed notification + ByteBuffer buffer = handler.getSendFailedByteBuffer(); + check(buffer.remaining() == sent); + check(buffer.position() == 0); + check(buffer.limit() == sent); + assertSameContent(sendBuffer, handler.getSendFailedByteBuffer()); + } else { + debug("Unexpected event or received data. Check output."); + } } } @@ -112,6 +118,7 @@ { /** Reference to the buffer captured in send failed notification */ private ByteBuffer sentBuffer; + boolean receivedSendFailed; @Override public HandlerResult handleNotification( @@ -134,6 +141,7 @@ public HandlerResult handleNotification( SendFailedNotification notification, Object attachment) { debug("%nSendFailedNotification: %s. ", notification); + receivedSendFailed = true; sentBuffer = notification.buffer(); return HandlerResult.RETURN; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java --- openjdk-lts-11.0.21+9/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java 2024-01-09 21:19:49.000000000 +0000 @@ -154,7 +154,6 @@ /* SCTP_PRIMARY_ADDR */ void sctpPrimaryAddr() throws IOException { - SocketAddress addrToSet = null; ByteBuffer buffer = ByteBuffer.allocate(Util.SMALL_BUFFER); System.out.println("TESTING SCTP_PRIMARY_ADDR"); @@ -189,12 +188,11 @@ SctpChannel peerChannel = ssc.accept(); ssc.close(); - Set peerAddrs = peerChannel.getAllLocalAddresses(); - debug("Peer local Addresses: "); - for (Iterator it = peerAddrs.iterator(); it.hasNext(); ) { + Set remoteAddresses = smc.getRemoteAddresses(assoc); + debug("Remote Addresses: "); + for (Iterator it = remoteAddresses.iterator(); it.hasNext(); ) { InetSocketAddress addr = (InetSocketAddress)it.next(); debug("\t" + addr); - addrToSet = addr; // any of the peer addresses will do! } /* retrieval of SCTP_PRIMARY_ADDR is not supported on Solaris */ @@ -207,25 +205,21 @@ } else { /* Linux */ SocketAddress primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr); - /* Verify that this is one of the peer addresses */ - boolean found = false; - addrToSet = primaryAddr; // may not have more than one addr - for (Iterator it = peerAddrs.iterator(); it.hasNext(); ) { - InetSocketAddress addr = (InetSocketAddress)it.next(); - if (addr.equals(primaryAddr)) { - found = true; - } - addrToSet = addr; - } - check(found, "SCTP_PRIMARY_ADDR returned bogus address!"); + /* Verify that this is one of the remote addresses */ + check(remoteAddresses.contains(primaryAddr), "SCTP_PRIMARY_ADDR returned bogus address!"); - System.out.println("Try SCTP_PRIMARY_ADDR set to: " + addrToSet); - smc.setOption(SCTP_PRIMARY_ADDR, addrToSet, assoc); - System.out.println("SCTP_PRIMARY_ADDR set to: " + addrToSet); - primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); - System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr); - check(addrToSet.equals(primaryAddr),"SCTP_PRIMARY_ADDR not set correctly"); + for (Iterator it = remoteAddresses.iterator(); it.hasNext(); ) { + InetSocketAddress addrToSet = (InetSocketAddress) it.next(); + System.out.println("SCTP_PRIMARY_ADDR try set to: " + addrToSet); + smc.setOption(SCTP_PRIMARY_ADDR, addrToSet, assoc); + System.out.println("SCTP_PRIMARY_ADDR set to : " + addrToSet); + primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); + System.out.println("SCTP_PRIMARY_ADDR returned : " + primaryAddr); + check(addrToSet.equals(primaryAddr), "SCTP_PRIMARY_ADDR not set correctly"); + } } + smc.close(); + peerChannel.close(); } class SOTNotificationHandler extends AbstractNotificationHandler diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/AWTEventMulticaster/ArrayStoreException.java openjdk-lts-11.0.22+7/test/jdk/java/awt/AWTEventMulticaster/ArrayStoreException.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/AWTEventMulticaster/ArrayStoreException.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/AWTEventMulticaster/ArrayStoreException.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4513402 + @summary AWTEventMulticaster.getListeners throws unexpected ArrayStoreException +*/ + +import java.awt.AWTEventMulticaster; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentListener; +import java.awt.event.FocusListener; + +public class ArrayStoreException { + + public static void main(String[] args) throws Exception { + + ComponentListener mc = + AWTEventMulticaster.add( + new ComponentAdapter() {}, + new ComponentAdapter() {}); + + if (AWTEventMulticaster.getListeners(mc, FocusListener.class).length == 0) { + System.out.println("OKAY"); + } else { + System.out.println("empty array expected"); + throw new RuntimeException("Test failed"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/AWTKeyStroke/ToStringTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/AWTKeyStroke/ToStringTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/AWTKeyStroke/ToStringTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/AWTKeyStroke/ToStringTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,323 @@ +/* + * Copyright (c) 2003, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4370733 + @summary AWTKeyStroke's getAWTKeyStroke(String) and toString() method aren't symmetric +*/ + +import java.awt.AWTKeyStroke; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import javax.swing.KeyStroke; + +public class ToStringTest { + + /* Note this test is deliberately testing the deprecated constants + * as well as their replacements. + */ + @SuppressWarnings("deprecation") + public static final int[] modifiers = { + 0, + InputEvent.SHIFT_MASK, + InputEvent.CTRL_MASK, + InputEvent.META_MASK, + InputEvent.ALT_MASK, + InputEvent.ALT_GRAPH_MASK, + InputEvent.BUTTON1_MASK, + InputEvent.BUTTON2_MASK, + InputEvent.BUTTON3_MASK, + InputEvent.SHIFT_DOWN_MASK, + InputEvent.CTRL_DOWN_MASK, + InputEvent.META_DOWN_MASK, + InputEvent.ALT_DOWN_MASK, + InputEvent.BUTTON1_DOWN_MASK, + InputEvent.BUTTON2_DOWN_MASK, + InputEvent.BUTTON3_DOWN_MASK, + InputEvent.ALT_GRAPH_DOWN_MASK + }; + + public static final int[] keys = { + KeyEvent.VK_A, + KeyEvent.VK_B, + KeyEvent.VK_C, + KeyEvent.VK_D, + KeyEvent.VK_E, + KeyEvent.VK_F, + KeyEvent.VK_G, + KeyEvent.VK_H, + KeyEvent.VK_I, + KeyEvent.VK_J, + KeyEvent.VK_K, + KeyEvent.VK_L, + KeyEvent.VK_M, + KeyEvent.VK_N, + KeyEvent.VK_O, + KeyEvent.VK_P, + KeyEvent.VK_Q, + KeyEvent.VK_R, + KeyEvent.VK_S, + KeyEvent.VK_T, + KeyEvent.VK_U, + KeyEvent.VK_V, + KeyEvent.VK_W, + KeyEvent.VK_X, + KeyEvent.VK_Y, + KeyEvent.VK_Z, + KeyEvent.VK_0, + KeyEvent.VK_1, + KeyEvent.VK_2, + KeyEvent.VK_3, + KeyEvent.VK_4, + KeyEvent.VK_5, + KeyEvent.VK_6, + KeyEvent.VK_7, + KeyEvent.VK_8, + KeyEvent.VK_9, + + KeyEvent.VK_COMMA, + KeyEvent.VK_PERIOD, + KeyEvent.VK_SLASH, + KeyEvent.VK_SEMICOLON, + KeyEvent.VK_EQUALS, + KeyEvent.VK_OPEN_BRACKET, + KeyEvent.VK_BACK_SLASH, + KeyEvent.VK_CLOSE_BRACKET, + + KeyEvent.VK_ENTER, + KeyEvent.VK_BACK_SPACE, + KeyEvent.VK_TAB, + KeyEvent.VK_CANCEL, + KeyEvent.VK_CLEAR, + KeyEvent.VK_SHIFT, + KeyEvent.VK_CONTROL, + KeyEvent.VK_ALT, + KeyEvent.VK_PAUSE, + KeyEvent.VK_CAPS_LOCK, + KeyEvent.VK_ESCAPE, + KeyEvent.VK_SPACE, + KeyEvent.VK_PAGE_UP, + KeyEvent.VK_PAGE_DOWN, + KeyEvent.VK_END, + KeyEvent.VK_HOME, + KeyEvent.VK_LEFT, + KeyEvent.VK_UP, + KeyEvent.VK_RIGHT, + KeyEvent.VK_DOWN, + KeyEvent.VK_ADD, + KeyEvent.VK_SEPARATOR, + KeyEvent.VK_SUBTRACT, + KeyEvent.VK_DECIMAL, + KeyEvent.VK_DIVIDE, + KeyEvent.VK_DELETE, + KeyEvent.VK_NUM_LOCK, + KeyEvent.VK_SCROLL_LOCK, + + KeyEvent.VK_WINDOWS, + KeyEvent.VK_CONTEXT_MENU, + + KeyEvent.VK_F1, + KeyEvent.VK_F2, + KeyEvent.VK_F3, + KeyEvent.VK_F4, + KeyEvent.VK_F5, + KeyEvent.VK_F6, + KeyEvent.VK_F7, + KeyEvent.VK_F8, + KeyEvent.VK_F9, + KeyEvent.VK_F10, + KeyEvent.VK_F11, + KeyEvent.VK_F12, + KeyEvent.VK_F13, + KeyEvent.VK_F14, + KeyEvent.VK_F15, + KeyEvent.VK_F16, + KeyEvent.VK_F17, + KeyEvent.VK_F18, + KeyEvent.VK_F19, + KeyEvent.VK_F20, + KeyEvent.VK_F21, + KeyEvent.VK_F22, + KeyEvent.VK_F23, + KeyEvent.VK_F24, + + KeyEvent.VK_PRINTSCREEN, + KeyEvent.VK_INSERT, + KeyEvent.VK_HELP, + KeyEvent.VK_META, + KeyEvent.VK_BACK_QUOTE, + KeyEvent.VK_QUOTE, + + KeyEvent.VK_KP_UP, + KeyEvent.VK_KP_DOWN, + KeyEvent.VK_KP_LEFT, + KeyEvent.VK_KP_RIGHT, + + KeyEvent.VK_DEAD_GRAVE, + KeyEvent.VK_DEAD_ACUTE, + KeyEvent.VK_DEAD_CIRCUMFLEX, + KeyEvent.VK_DEAD_TILDE, + KeyEvent.VK_DEAD_MACRON, + KeyEvent.VK_DEAD_BREVE, + KeyEvent.VK_DEAD_ABOVEDOT, + KeyEvent.VK_DEAD_DIAERESIS, + KeyEvent.VK_DEAD_ABOVERING, + KeyEvent.VK_DEAD_DOUBLEACUTE, + KeyEvent.VK_DEAD_CARON, + KeyEvent.VK_DEAD_CEDILLA, + KeyEvent.VK_DEAD_OGONEK, + KeyEvent.VK_DEAD_IOTA, + KeyEvent.VK_DEAD_VOICED_SOUND, + KeyEvent.VK_DEAD_SEMIVOICED_SOUND, + + KeyEvent.VK_AMPERSAND, + KeyEvent.VK_ASTERISK, + KeyEvent.VK_QUOTEDBL, + KeyEvent.VK_LESS, + KeyEvent.VK_GREATER, + KeyEvent.VK_BRACELEFT, + KeyEvent.VK_BRACERIGHT, + KeyEvent.VK_AT, + KeyEvent.VK_COLON, + KeyEvent.VK_CIRCUMFLEX, + KeyEvent.VK_DOLLAR, + KeyEvent.VK_EURO_SIGN, + KeyEvent.VK_EXCLAMATION_MARK, + KeyEvent.VK_INVERTED_EXCLAMATION_MARK, + KeyEvent.VK_LEFT_PARENTHESIS, + KeyEvent.VK_NUMBER_SIGN, + KeyEvent.VK_MINUS, + KeyEvent.VK_PLUS, + KeyEvent.VK_RIGHT_PARENTHESIS, + KeyEvent.VK_UNDERSCORE, + + KeyEvent.VK_FINAL, + KeyEvent.VK_CONVERT, + KeyEvent.VK_NONCONVERT, + KeyEvent.VK_ACCEPT, + KeyEvent.VK_MODECHANGE, + KeyEvent.VK_KANA, + KeyEvent.VK_KANJI, + KeyEvent.VK_ALPHANUMERIC, + KeyEvent.VK_KATAKANA, + KeyEvent.VK_HIRAGANA, + KeyEvent.VK_FULL_WIDTH, + KeyEvent.VK_HALF_WIDTH, + KeyEvent.VK_ROMAN_CHARACTERS, + KeyEvent.VK_ALL_CANDIDATES, + KeyEvent.VK_PREVIOUS_CANDIDATE, + KeyEvent.VK_CODE_INPUT, + KeyEvent.VK_JAPANESE_KATAKANA, + KeyEvent.VK_JAPANESE_HIRAGANA, + KeyEvent.VK_JAPANESE_ROMAN, + KeyEvent.VK_KANA_LOCK, + KeyEvent.VK_INPUT_METHOD_ON_OFF, + + KeyEvent.VK_AGAIN, + KeyEvent.VK_UNDO, + KeyEvent.VK_COPY, + KeyEvent.VK_PASTE, + KeyEvent.VK_CUT, + KeyEvent.VK_FIND, + KeyEvent.VK_PROPS, + KeyEvent.VK_STOP, + + KeyEvent.VK_COMPOSE, + KeyEvent.VK_ALT_GRAPH, + KeyEvent.VK_BEGIN, + + KeyEvent.VK_NUMPAD0, + KeyEvent.VK_NUMPAD1, + KeyEvent.VK_NUMPAD2, + KeyEvent.VK_NUMPAD3, + KeyEvent.VK_NUMPAD4, + KeyEvent.VK_NUMPAD5, + KeyEvent.VK_NUMPAD6, + KeyEvent.VK_NUMPAD7, + KeyEvent.VK_NUMPAD8, + KeyEvent.VK_NUMPAD9 + }; + + public static void main(String[] args) throws Exception { + + System.err.println("**** Testing AWTKeyStrokes"); + for (int n_key=0; n_key < keys.length; n_key++) { + for (int n_mod=0; n_mod < modifiers.length; n_mod++) { + checkStroke(AWTKeyStroke.getAWTKeyStroke(keys[n_key], + modifiers[n_mod], + true)); + checkStroke(AWTKeyStroke.getAWTKeyStroke(keys[n_key], + modifiers[n_mod], + false)); + } + } + + System.err.println("**** Testing Swing KeyStrokes"); + for (int n_key=0; n_key < keys.length; n_key++) { + for (int n_mod=0; n_mod < modifiers.length; n_mod++) { + checkStroke(KeyStroke.getKeyStroke(keys[n_key], + modifiers[n_mod], + true)); + checkStroke(KeyStroke.getKeyStroke(keys[n_key], + modifiers[n_mod], + false)); + } + } + + Character a = Character.valueOf('a'); + System.err.println("**** Testing KEY_TYPED AWTKeyStrokes"); + for (int n_mod = 0; n_mod < modifiers.length; n_mod++) { + checkStroke(AWTKeyStroke.getAWTKeyStroke(a, modifiers[n_mod])); + } + System.err.println("**** Testing KEY_TYPED Swing KeyStrokes"); + for (int n_mod = 0; n_mod < modifiers.length; n_mod++) { + checkStroke(KeyStroke.getKeyStroke(a, modifiers[n_mod])); + } + + System.out.println("Test passed."); + } + + public static void checkStroke(AWTKeyStroke original) { + System.err.println("AWT Original >> " + original); + AWTKeyStroke copy = AWTKeyStroke.getAWTKeyStroke(original.toString()); + // System.err.println("AWT Copy >> " + copy); + if (!original.equals(copy)) { + System.out.println("AWT bad copy for VK= 0x" + + Integer.toString(original.getKeyCode(), 16)); + throw new RuntimeException("Test Failed: for " + original); + } + } + + public static void checkStroke(KeyStroke original) { + System.err.println("Swing Original >> " + original); + KeyStroke copy = KeyStroke.getKeyStroke(original.toString()); + // System.err.println("Swing Copy >> " + copy); + if (!original.equals(copy)) { + System.out.println("Swing bad copy for VK= 0x" + + Integer.toString(original.getKeyCode(), 16)); + throw new RuntimeException("Test Failed: for " + original); + } + } + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/BorderLayout/NullConstraintsReturns.java openjdk-lts-11.0.22+7/test/jdk/java/awt/BorderLayout/NullConstraintsReturns.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/BorderLayout/NullConstraintsReturns.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/BorderLayout/NullConstraintsReturns.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6242148 + @summary API method java.awt.BorderLayout.getConstraints(null) should return null +*/ + +import java.awt.BorderLayout; + +public class NullConstraintsReturns { + + public static void main(String[] args) { + BorderLayout bl = new BorderLayout(); + Object constraints = bl.getConstraints(null); + if (constraints != null) { + throw new RuntimeException("Test failed. Constraints is not null: " + constraints); + } + System.out.println("Test Passed."); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/ButtonNullLabelTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/ButtonNullLabelTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/ButtonNullLabelTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/ButtonNullLabelTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * Copyright (c) 1999, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4245382 + @summary Tests that Button.setLabel(null) does not cause NPE in Java code or VM crash + @key headful +*/ + +import java.awt.Button; +import java.awt.EventQueue; +import java.awt.Frame; + +public class ButtonNullLabelTest { + + public static void main(String args[]) throws Exception { + EventQueue.invokeAndWait(() -> runTest()); + } + + static void runTest() { + // Native code test + Frame frame = new Frame("Test null in native"); + Button button = new Button(); + try { + button.setLabel(null); + System.out.println("Set to null - test native"); + frame.add(button); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + System.out.println("Test null in native **successful**"); + } catch (NullPointerException npe) { + System.out.println("Test failed - test native"); + throw new RuntimeException("Test failed - test native"); + } finally { + frame.dispose(); + } + + // Peer code test + frame = new Frame("Test null in peer before show"); + button = new Button(); + try { + System.out.println("Set to null - test native before show"); + frame.add(button); + frame.pack(); + button.setLabel(null); + frame.setVisible(true); + System.out.println("Set null in peer before show **successful**"); + } catch (NullPointerException npe) { + System.out.println("Test failed - test peer before show"); + throw new RuntimeException("Test failed - test peer before show"); + } finally { + frame.dispose(); + } + + // Peer code test + frame = new Frame("Test null in peer after show"); + button = new Button(); + try { + System.out.println("Set to null - test peer after show"); + frame.add(button); + frame.pack(); + frame.setVisible(true); + button.setLabel(null); + System.out.println("Test null in peer after show **successful**"); + } catch (NullPointerException npe) { + System.out.println("Test failed - peer after show"); + throw new RuntimeException("Test failed - peer after show"); + } finally { + frame.dispose(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/DisabledButtonPress.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/DisabledButtonPress.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/DisabledButtonPress.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/DisabledButtonPress.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 5044469 + @summary REG: Disabled component gains focus and receives keyevents on win32 + @key headful +*/ + +import java.awt.AWTException; +import java.awt.Button; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.KeyEvent; + +public class DisabledButtonPress implements ActionListener, FocusListener { + + public static void main(String[] args) throws Exception { + try { + DisabledButtonPress test = new DisabledButtonPress(); + EventQueue.invokeAndWait(() -> test.createUI()); + runTest(); + } finally { + if (f != null) { + f.dispose(); + } + } + if (!testPassed) { + throw new RuntimeException("Test Failed."); + } + } + + final static Object FOCUS_LOCK = new Object(); + final static Object ACTION_LOCK = new Object(); + static volatile Frame f; + static volatile Button b2; + static volatile boolean testPassed = true; + + public void createUI() { + f = new Frame("DisabledButtonPress"); + b2 = new Button("Click Me"); + b2.addActionListener(this); + b2.addFocusListener(this); + f.add(b2); + f.pack(); + f.setVisible(true); + } + + static void runTest() throws Exception { + + Robot robot = new Robot(); + robot.delay(500); + System.out.println("Requesting focus"); + System.out.println(" b2.requestFocusInWindow()="+ b2.requestFocusInWindow()); + b2.setEnabled(false); + synchronized(FOCUS_LOCK) { + FOCUS_LOCK.wait(3000); + } + if (!b2.isFocusOwner()) { + throw new RuntimeException("Test failed. Button doesn't have a focus."); + } + System.out.println("Button disabling"); + robot.delay(1000); + robot.keyPress(KeyEvent.VK_SPACE); + robot.delay(10); + robot.keyRelease(KeyEvent.VK_SPACE); + synchronized(ACTION_LOCK) { + ACTION_LOCK.wait(2000); //give time to handle + // ACTION_PERFORMED event from the Button if it was generated + } + } + + public void focusGained(FocusEvent ae) { + System.out.println("Button got focus"); + synchronized(FOCUS_LOCK) { + FOCUS_LOCK.notify(); + } + } + + public void focusLost(FocusEvent ae) {} + + public void actionPerformed(ActionEvent evt) { + System.out.println("Button: " + evt.getActionCommand() + " Clicked. Event is " +evt); + if (evt.getSource() == b2) { + testPassed = false; + synchronized(ACTION_LOCK) { + ACTION_LOCK.notify(); + } + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/DoubleActionEventTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/DoubleActionEventTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Button/DoubleActionEventTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Button/DoubleActionEventTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4531849 + @summary Test that double action event no longer sent + @key headful +*/ + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.InputEvent; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; + +public class DoubleActionEventTest implements ActionListener, WindowListener { + + static class Lock { + boolean go = false; + public synchronized boolean getGo() {return go;} + public synchronized void setGo(boolean newGo) {go = newGo;} + } + + static volatile Frame f; + static volatile int numActionEvents = 0; + static volatile Lock lock = new Lock(); + + public static void main(String[] args) throws Exception { + try { + DoubleActionEventTest test = new DoubleActionEventTest(); + EventQueue.invokeAndWait(() -> test.createUI()); + runTest(); + } finally { + if (f != null) { + f.dispose(); + } + } + } + + public void createUI() { + f = new Frame("DoubleActionEventTest"); + f.setLayout (new BorderLayout()); + f.addWindowListener(this); + Button b = new Button("Action Listening Button"); + b.addActionListener(this); + f.add(b); + f.setBounds(100, 100, 200, 200); + f.setVisible(true); + } + + static void runTest() throws Exception { + + Robot robot = new Robot(); + robot.setAutoDelay(250); + robot.setAutoWaitForIdle(true); + robot.mouseMove(200, 200); + + while (!lock.getGo()) {} + + robot.mousePress(InputEvent.BUTTON3_DOWN_MASK); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK); + + if (numActionEvents != 1) { + System.out.println("Wrong number of ActionEvents. Test FAILS."); + throw new RuntimeException("TEST FAILS"); + } + } + + public void actionPerformed(ActionEvent e) { + numActionEvents++; + System.out.println("Number of ActionEvents: " + numActionEvents); + } + + public void windowActivated(WindowEvent e) { + lock.setGo(true); + } + public void windowClosed(WindowEvent e) {} + public void windowClosing(WindowEvent e) {} + public void windowDeactivated(WindowEvent e) {} + public void windowDeiconified(WindowEvent e) {} + public void windowIconified(WindowEvent e) {} + public void windowOpened(WindowEvent e) {} + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/CardLayout/CardsOrderTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/CardLayout/CardsOrderTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/CardLayout/CardsOrderTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/CardLayout/CardsOrderTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4689398 + @summary Inserting items in a Container with CardLayout does not work since Merlin +*/ + +import java.awt.CardLayout; +import java.awt.Component; +import java.awt.Container; + +public class CardsOrderTest { + + public static void main(String[] args) throws Exception { + + CardLayout layout = new CardLayout(); + Container cont = new Container(); + Component comp1 = new Component() {}; + Component comp2 = new Component() {}; + Component comp3 = new Component() {}; + cont.setLayout(layout); + cont.add(comp1, "1", 0); + cont.add(comp2, "2", 0); + cont.add(comp3, "3", 0); + + // Testing visibility "state" - not actually if its visible on screen + // since this test does not require a UI. + System.out.println("comp1.isVisible() = " + comp1.isVisible()); + System.out.println("comp2.isVisible() = " + comp2.isVisible()); + System.out.println("comp3.isVisible() = " + comp3.isVisible()); + + if (!comp1.isVisible() || comp2.isVisible() || comp3.isVisible()) { + throw new RuntimeException("first added component must be visible"); + } + + System.out.println("CardLayout.next()"); + layout.next(cont); + + System.out.println("comp1.isVisible() = " + comp1.isVisible()); + System.out.println("comp2.isVisible() = " + comp2.isVisible()); + System.out.println("comp3.isVisible() = " + comp3.isVisible()); + + if (!comp3.isVisible() ||comp1.isVisible() || comp2.isVisible()) { + throw new RuntimeException("the wrong component is visible after CardLayout.next() (must be comp3)"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/CardLayout/ObedienceTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/CardLayout/ObedienceTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/CardLayout/ObedienceTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/CardLayout/ObedienceTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4690266 + @summary REGRESSION: Wizard Page does not move to the next page +*/ + +import java.awt.CardLayout; +import java.awt.Component; +import java.awt.Container; + +public class ObedienceTest { + + public static void main(String[] args) { + Container cont = new Container(); + Component comp1 = new Component() {}; + Component comp2 = new Component() {}; + CardLayout layout = new CardLayout(); + cont.setLayout(layout); + cont.add(comp1, "first"); + cont.add(comp2, "second"); + + if (!comp1.isVisible()) { + throw new RuntimeException("first component must be visible"); + } + + comp1.setVisible(false); + comp2.setVisible(true); + layout.layoutContainer(cont); + + if (!comp2.isVisible() || comp1.isVisible()) { + System.out.println("comp1.isVisible() = " + comp1.isVisible()); + System.out.println("comp2.isVisible() = " + comp2.isVisible()); + throw new RuntimeException("manually shown component must be visible after layoutContainer()"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/CheckboxCrashTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/CheckboxCrashTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/CheckboxCrashTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/CheckboxCrashTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2000, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4378378 + @summary Tests that checkbox.setLabel(null) doesn't crash the VM. + @key headful +*/ + +import java.awt.Checkbox; +import java.awt.EventQueue; +import java.awt.Frame; + +public class CheckboxCrashTest { + + static Frame f; + + public static void main(String[] args) throws Exception { + try { + EventQueue.invokeAndWait(() -> runTest()); + Thread.sleep(1000); + } finally { + f.dispose(); + } + } + + static void runTest() { + f = new Frame("CheckboxCrashTest"); + Checkbox cb = new Checkbox(); + f.add(cb); + f.pack(); + cb.setLabel(null); + f.setVisible(true); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/MultiCheckedCheckboxGroupTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/MultiCheckedCheckboxGroupTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/MultiCheckedCheckboxGroupTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/MultiCheckedCheckboxGroupTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4136496 + @key headful + @summary Checkbox.setCheckboxGroup(CheckboxGroup) works wrong on some Checkbox states +*/ + +import java.awt.Checkbox; +import java.awt.CheckboxGroup; + +public class MultiCheckedCheckboxGroupTest { + + public static void main(String[] args) throws Exception { + + CheckboxGroup gr = new CheckboxGroup(); + Checkbox chb1 = new Checkbox("Box 1", true, gr); + Checkbox chb2 = new Checkbox("Box 2", true, null); + + chb2.setCheckboxGroup(gr); + + System.out.println("chb1="+chb1); + System.out.println("chb2="+chb2); + System.out.println("gr.getSelectedCheckbox="+gr.getSelectedCheckbox()); + + if(chb1.getState() + && !chb2.getState() + && chb1.getCheckboxGroup() == gr + && chb2.getCheckboxGroup() == gr + && gr.getSelectedCheckbox() == chb1) { + System.out.println("PASSED"); + } else { + System.out.println("FAILED"); + throw new RuntimeException("Test FAILED"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/NullCheckboxGroupTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/NullCheckboxGroupTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/NullCheckboxGroupTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/NullCheckboxGroupTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4114268 + @key headful + @summary Checkbox.setCheckboxGroup(null) alters selection for CB's previous CBGroup +*/ + +import java.awt.Checkbox; +import java.awt.CheckboxGroup; + +public class NullCheckboxGroupTest { + + + public static void main(String[] args) { + CheckboxGroup cbg = new CheckboxGroup(); + Checkbox chbox1 = new Checkbox("First", cbg, true); + Checkbox chbox2 = new Checkbox("Second", cbg, false); + + chbox2.setCheckboxGroup(null); + + System.out.println("chbox1="+chbox1); + System.out.println("chbox2="+chbox2); + System.out.println("cbg="+cbg); + + if (cbg.getSelectedCheckbox() != chbox1) { + System.out.println("FAILED"); + throw new RuntimeException("Test FAILED"); + } else { + System.out.println("PASSED"); + } + } + } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/SetCheckboxGroupNull.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/SetCheckboxGroupNull.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Checkbox/SetCheckboxGroupNull.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Checkbox/SetCheckboxGroupNull.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4726853 + @key headful + @summary Checkbox is changing it's state after removing from CheckboxGroup +*/ + +import java.awt.Checkbox; +import java.awt.CheckboxGroup; + +public class SetCheckboxGroupNull { + + public static void main(String[] args) { + boolean passed = true; + + // 1 step + { + CheckboxGroup g = new CheckboxGroup(); + Checkbox cb1 = new Checkbox("Label", true, g); + System.out.println("1. (should be true) "+cb1.getState()); + passed = passed && (cb1.getState() == true); + cb1.setCheckboxGroup(null); + System.out.println("2. (should be true) "+cb1.getState()); + passed = passed && (cb1.getState() == true); + } + + // 2 step + { + CheckboxGroup g = new CheckboxGroup(); + Checkbox cb1 = new Checkbox("CB1", true, g); + System.out.println("3. (should be true) " + cb1.getState()); + passed = passed && (cb1.getState() == true); + g.setSelectedCheckbox(null); + System.out.println("4. (should be false) " + cb1.getState()); + passed = passed && (cb1.getState() == false); + } + + if (!passed) { + throw new RuntimeException("SetCheckboxGroupNull FAILED"); + } + System.out.println("SetCheckboxGroupNull PASSED"); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/DragOffNoSelectTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/DragOffNoSelectTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/DragOffNoSelectTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/DragOffNoSelectTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -71,7 +71,7 @@ } frame.add(theChoice); frame.addWindowListener(testInstance); - frame.setSize(400, 400); + frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/EmptyChoiceTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/EmptyChoiceTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/EmptyChoiceTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/EmptyChoiceTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2003, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4908468 + @summary Linux Empty Choice throws NPE + @key headful + @run main EmptyChoiceTest +*/ +import java.awt.BorderLayout; +import java.awt.Choice; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Image; +import java.lang.reflect.InvocationTargetException; + +public class EmptyChoiceTest +{ + Frame frame; + Choice choice = null; + + public static void main(String[] args) throws + InterruptedException, + InvocationTargetException { + EventQueue.invokeAndWait(() -> { + EmptyChoiceTest emptyChoiceTest = new EmptyChoiceTest(); + emptyChoiceTest.init(); + emptyChoiceTest.test(); + }); + } + + public void init() { + frame = new Frame(); + frame.setLayout(new BorderLayout()); + choice = new Choice(); + frame.add(choice, BorderLayout.NORTH); + frame.setSize(200, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + frame.validate(); + } + + public void test () { + try { + int iWidth = choice.getWidth(); + int iHeight = choice.getHeight(); + Image componentImage = + choice.createImage(iWidth, iHeight); + Graphics graphics = + componentImage.getGraphics(); + graphics.setClip(0, 0, iWidth, iHeight); + choice.printAll(graphics); + System.out.println("PrintAll successful!"); + } catch (NullPointerException exp) { + throw new RuntimeException("Test failed. " + + "Empty Choice printAll throws NullPointerException"); + } catch (Exception exc){ + throw new RuntimeException("Test failed.", exc); + } finally { + frame.dispose(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/InsertRemoveTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/InsertRemoveTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/InsertRemoveTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/InsertRemoveTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2003, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4115130 + @summary Tests Inserting/Removing items doesn't cause crash. + @key headful + @run main InsertRemoveTest + */ + +import java.awt.BorderLayout; +import java.awt.Choice; +import java.awt.EventQueue; +import java.awt.Frame; +import java.lang.reflect.InvocationTargetException; + +public class InsertRemoveTest { + Choice choice1; + Choice choice2; + Choice choice3; + Frame f; + int itemCount = 0; + int iterCount = 0; + + public static void main(String[] args) + throws InterruptedException, InvocationTargetException { + EventQueue.invokeAndWait(() -> new InsertRemoveTest().start()); + } + + public void start() { + f = new Frame("Check Choice"); + f.setLayout(new BorderLayout()); + + choice1 = new Choice(); + choice2 = new Choice(); + choice3 = new Choice(); + + f.add(choice1, BorderLayout.NORTH); + f.add(choice3, BorderLayout.CENTER); + f.add(choice2, BorderLayout.SOUTH); + + f.pack(); + f.setLocationRelativeTo(null); + f.setVisible(true); + + try { + for (int i = 0; i < 50; i++) { + if (choice1 != null && itemCount < 40) { + choice1.insert("I am Choice, yes I am : " + iterCount, + 0); + choice2.add("I am the same, yes I am : " + iterCount); + choice3.insert("I am the same, yes I am : " + iterCount, + 10); + itemCount++; + iterCount++; + } + if (itemCount >= 20 && choice1 != null + && choice1.getItemCount() > 0) { + choice1.remove(0); + choice2.remove(10); + choice3.remove(19); + itemCount--; + } + f.validate(); + } + } finally { + f.dispose(); + } + } + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/OpenedChoiceHangs.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/OpenedChoiceHangs.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/OpenedChoiceHangs.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/OpenedChoiceHangs.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6246503 + @summary Disabling a choice after selection locks keyboard, \ + mouse and makes the system unusable + @key headful + @run main OpenedChoiceHangs +*/ + +import java.awt.AWTException; +import java.awt.Button; +import java.awt.Choice; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.FocusEvent; +import java.awt.event.InputEvent; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.KeyEvent; +import java.lang.reflect.InvocationTargetException; + +public class OpenedChoiceHangs implements ItemListener { + static final Object FOCUS_LOCK = new Object(); + + Frame frame; + Choice ch = new Choice(); + Button b = new Button("A button"); + Robot robot; + + public static void main(String[] args) + throws InterruptedException, InvocationTargetException { + OpenedChoiceHangs openedChoiceHangs = new OpenedChoiceHangs(); + EventQueue.invokeAndWait(openedChoiceHangs::init); + openedChoiceHangs.test(); + } + + public void init() { + frame = new Frame(); + + frame.setLayout(new FlowLayout()); + for (int i = 1; i < 10; i++) { + ch.add("item " + i); + } + frame.add(ch); + frame.add(b); + ch.setBackground(new Color(255, 0, 0)); + ch.setForeground(new Color(255, 0, 0)); + ch.addItemListener(this); + + frame.setSize(200, 200); + frame.setVisible(true); + frame.setLocationRelativeTo(null); + frame.validate(); + } + + public void test() { + try { + robot = new Robot(); + robot.setAutoDelay(100); + robot.setAutoWaitForIdle(true); + robot.delay(1000); + robot.mouseMove(ch.getLocationOnScreen().x + ch.getWidth() / 2, + ch.getLocationOnScreen().y + ch.getHeight() / 2); + + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(1000); + if (!ch.isFocusOwner()) { + synchronized (FOCUS_LOCK) { + FOCUS_LOCK.wait(3000); + } + } + if (!ch.isFocusOwner()){ + throw new RuntimeException( + "Test failed. Choice has no focus after mouse press."); + } + robot.keyPress(KeyEvent.VK_DOWN); + robot.keyRelease(KeyEvent.VK_DOWN); + robot.delay(1000); + + robot.keyPress(KeyEvent.VK_UP); + robot.keyRelease(KeyEvent.VK_UP); + robot.delay(1000); + + Color color = robot.getPixelColor( + ch.getLocationOnScreen().x + ch.getWidth() / 2, + ch.getLocationOnScreen().y + ch.getHeight() * 4); + System.out.println("Color is " + color); + if (color.equals(new Color(255, 0,0))){ + throw new RuntimeException( + "Test failed. Choice is disabled and still opened. "); + } + } catch (AWTException e) { + throw new RuntimeException( + "Test interrupted due to AWTException. Robot=" + robot, e); + } catch (InterruptedException e) { + throw new RuntimeException("Test interrupted. Robot=" + robot, e); + } finally { + EventQueue.invokeLater(frame::dispose); + } + + System.out.println("Test passed: Choice became closed after disabling."); + } + + public void itemStateChanged (ItemEvent ie) { + System.out.println("Choice Item has changed: "+ie); + ch.setEnabled(false); + } + public void focusGained(FocusEvent fEvent){ + System.out.println("focusGained"+fEvent); + synchronized(FOCUS_LOCK){ + FOCUS_LOCK.notify(); + } + } + + public void focusLost(FocusEvent fEvent){ + System.out.println("focusLost"+fEvent); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/PressOutsideOpenedChoice.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/PressOutsideOpenedChoice.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Choice/PressOutsideOpenedChoice.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Choice/PressOutsideOpenedChoice.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6259328 + @summary Choice scrolls when dragging the parent frame while drop-down \ + is active + @key headful + @run main PressOutsideOpenedChoice +*/ + + +import java.awt.Choice; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.InputEvent; +import java.lang.reflect.InvocationTargetException; + +public class PressOutsideOpenedChoice extends Frame { + Robot robot; + Choice choice1 = new Choice(); + Point pt; + + public static void main(String[] args) + throws InterruptedException, InvocationTargetException { + PressOutsideOpenedChoice pressOutsideOpenedChoice = + new PressOutsideOpenedChoice(); + EventQueue.invokeAndWait(pressOutsideOpenedChoice::init); + pressOutsideOpenedChoice.start(); + } + + public void init() { + for (int i = 1; i < 50; i++) { + choice1.add("item-" + i); + } + choice1.setForeground(Color.red); + choice1.setBackground(Color.red); + add(choice1); + setLayout(new FlowLayout()); + setSize (200,200); + setLocationRelativeTo(null); + setVisible(true); + validate(); + } + + public void start() { + try { + robot = new Robot(); + robot.setAutoWaitForIdle(true); + robot.setAutoDelay(50); + robot.delay(1000); + testPressOutsideOpenedChoice(InputEvent.BUTTON1_DOWN_MASK); + } catch (Throwable e) { + throw new RuntimeException("Test failed. Exception thrown: " + e); + } finally { + EventQueue.invokeLater(this::dispose); + } + } + + public void testPressOutsideOpenedChoice(int button) { + pt = choice1.getLocationOnScreen(); + robot.mouseMove(pt.x + choice1.getWidth() - choice1.getHeight() / 4, + pt.y + choice1.getHeight() / 2); + robot.delay(100); + robot.mousePress(button); + robot.mouseRelease(button); + robot.delay(200); + //move mouse outside of the choice + robot.mouseMove(pt.x - choice1.getWidth() / 2, + pt.y + choice1.getHeight() / 2); + robot.delay(400); + robot.mousePress(button); + robot.mouseRelease(button); + robot.delay(200); + Color color = robot.getPixelColor(pt.x + choice1.getWidth() / 2, + pt.y + 3 * choice1.getHeight()); + System.out.println("color got " + + robot.getPixelColor(pt.x + choice1.getWidth() / 2, + pt.y + 3 * choice1.getHeight())); + if (color.equals(Color.red)) { + throw new RuntimeException("Test failed. Choice didn't close " + + "after mouse press outside of Choice " + button); + } else { + System.out.println("Test passed. " + + "Choice closed with MousePress outside"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Cursor/SingleColorCursorTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Cursor/SingleColorCursorTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Cursor/SingleColorCursorTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Cursor/SingleColorCursorTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4653170 + @summary Make sure setCursor does not produce Arithmetic Exception. + @key headful + @run main SingleColorCursorTest +*/ + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Cursor; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Toolkit; +import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; + +public class SingleColorCursorTest extends Panel { + public void init() { + setLayout (new BorderLayout()); + setSize (200,200); + add(new Button("JButton")); + } + + public void start () { + Cursor singleColorCursor = Toolkit.getDefaultToolkit() + .createCustomCursor(new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_BINARY), + new Point(0,0), "Single Color Cursor"); + try { + setCursor(singleColorCursor); + } catch (ArithmeticException ae) { + throw new RuntimeException("Setting a 1x1 custom cursor causes arithmetic exception"); + } + } + + public static void main(String[] args) throws InterruptedException, InvocationTargetException { + EventQueue.invokeAndWait(() -> { + Frame frame = new Frame("Test window"); + try { + SingleColorCursorTest test = new SingleColorCursorTest(); + test.init(); + frame.add(test); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + test.start(); + frame.setVisible(false); + } finally { + frame.dispose(); + } + }); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/ComponentShownEvent.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/ComponentShownEvent.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/ComponentShownEvent.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/ComponentShownEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1999, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4274360 + @summary Ensures that Dialogs receive COMPONENT_SHOWN events + @key headful + @run main ComponentShownEvent +*/ + +import java.awt.AWTException; +import java.awt.Dialog; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.lang.reflect.InvocationTargetException; + +public class ComponentShownEvent { + + volatile boolean componentShown = false; + Frame f; + Dialog d; + + public void start() throws InterruptedException, + InvocationTargetException, AWTException { + Robot robot = new Robot(); + try { + EventQueue.invokeAndWait(() -> { + f = new Frame(); + d = new Dialog(f); + + d.addComponentListener(new ComponentAdapter() { + public void componentShown(ComponentEvent e) { + componentShown = true; + } + }); + + f.setSize(100, 100); + f.setLocationRelativeTo(null); + f.setVisible(true); + d.setVisible(true); + }); + + robot.waitForIdle(); + robot.delay(1000); + + if (!componentShown) { + throw new RuntimeException("test failed"); + } + } finally { + EventQueue.invokeAndWait(() -> { + if (d != null) { + d.setVisible(false); + d.dispose(); + } + if (f != null) { + f.setVisible(false); + f.dispose(); + } + }); + } + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException, AWTException { + ComponentShownEvent test = new ComponentShownEvent(); + test.start(); + System.out.println("test passed"); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogAsParentOfFileDialog.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogAsParentOfFileDialog.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogAsParentOfFileDialog.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogAsParentOfFileDialog.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2003, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4221123 + @summary Why Dialog can't be an owner of FileDialog? + @key headful + @run main DialogAsParentOfFileDialog +*/ + +import java.awt.Dialog; +import java.awt.EventQueue; +import java.awt.FileDialog; +import java.awt.Frame; +import java.lang.reflect.InvocationTargetException; + +public class DialogAsParentOfFileDialog { + FileDialog fdialog; + + public void start () { + StringBuilder errors = new StringBuilder(); + String nl = System.lineSeparator(); + Dialog dlg; + String title; + int mode; + boolean passed; + + System.out.println("DialogAsParentOfFileDialog"); + + /* + * public FileDialog(Dialog parent), + * checks owner and default settings. + */ + System.out.print("\ttest 01: "); + dlg = new Dialog(new Frame()); + fdialog = new FileDialog(dlg); + passed = + fdialog.getOwner() == dlg + && fdialog.isModal() + && fdialog.getTitle().equals("") + && fdialog.getMode() == FileDialog.LOAD + && fdialog.getFile() == null + && fdialog.getDirectory() == null + && fdialog.getFilenameFilter() == null; + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + /* + * public FileDialog(Dialog parent, String title), + * checks owner, title and default settings. + */ + System.out.print("\ttest 02: "); + dlg = new Dialog(new Frame()); + title = "Title"; + fdialog = new FileDialog(dlg, title); + passed = + fdialog.getOwner() == dlg + && fdialog.isModal() + && fdialog.getTitle().equals(title) + && fdialog.getMode() == FileDialog.LOAD + && fdialog.getFile() == null + && fdialog.getDirectory() == null + && fdialog.getFilenameFilter() == null; + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + /* + * public FileDialog(Dialog parent, String title), + * title: null. + * expected results: FileDialog object with a null title + */ + System.out.print("\ttest 03: "); + dlg = new Dialog(new Frame()); + title = null; + fdialog = new FileDialog(dlg, title); + passed = + fdialog.getOwner() == dlg + && (fdialog.getTitle() == null + || fdialog.getTitle().equals("")); + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + /* + * public FileDialog(Dialog parent, String title, int mode), + * checks owner, title and mode. + */ + dlg = new Dialog(new Frame()); + title = "Title"; + + System.out.print("\ttest 04: "); + mode = FileDialog.SAVE; + fdialog = new FileDialog(dlg, title, mode); + passed = + fdialog.getOwner() == dlg + && fdialog.isModal() + && fdialog.getTitle().equals(title) + && fdialog.getMode() == mode + && fdialog.getFile() == null + && fdialog.getDirectory() == null + && fdialog.getFilenameFilter() == null; + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + System.out.print("\ttest 05: "); + mode = FileDialog.LOAD; + fdialog = new FileDialog(dlg, title, mode); + passed = + fdialog.getOwner() == dlg + && fdialog.isModal() + && fdialog.getTitle().equals(title) + && fdialog.getMode() == mode + && fdialog.getFile() == null + && fdialog.getDirectory() == null + && fdialog.getFilenameFilter() == null; + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + /* + * public FileDialog(Dialog parent, String title, int mode), + * mode: Integer.MIN_VALUE, Integer.MIN_VALUE+1, + * Integer.MAX_VALUE-1, Integer.MAX_VALUE + * expected results: IllegalArgumentException should be thrown + */ + System.out.print("\ttest 06: "); + dlg = new Dialog(new Frame()); + title = "Title"; + int[] modes = {Integer.MIN_VALUE, Integer.MIN_VALUE+1, + Integer.MAX_VALUE-1, Integer.MAX_VALUE}; + passed = true; + for (int i = 0; i < modes.length; i++) { + try { + fdialog = new FileDialog(dlg, title, modes[i]); + passed = false; + } catch (IllegalArgumentException e) {} + } + System.out.println(passed ? "passed" : "FAILED"); + if (!passed) { + errors.append(nl); + errors.append("DialogAsParentOfFileDialog FAILED"); + } + + if (errors.length() > 0) { + throw new RuntimeException("Following tests failed:" + errors); + } + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + EventQueue.invokeAndWait(() -> { + new DialogAsParentOfFileDialog().start(); + }); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogDeadlockTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogDeadlockTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogDeadlockTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogDeadlockTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2004, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 5006427 + @summary Shows many modal dialog and checks if there is a deadlock or thread race. + @key headful + @run main DialogDeadlockTest +*/ + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Dialog; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Window; +import java.lang.reflect.InvocationTargetException; +import java.util.LinkedList; +import java.util.List; + +public class DialogDeadlockTest { + public static final int MAX_COUNT = 200; + private static Dialog lastDialog; + private static Runnable r; + private static volatile int count; + private static volatile int cumul; + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + DialogDeadlockTest ddt = new DialogDeadlockTest(); + ddt.start(); + } + + public void start() { + final Frame frame = new Frame("abc"); + final List toDispose = new LinkedList<>(); + + try { + frame.setLocation(300, 0); + frame.add(new Button("def")); + frame.pack(); + frame.setVisible(true); + cumul = 0; + + r = new Runnable() { + public void run() { + count++; + if (count < 10) { + Dialog xlastDialog = lastDialog; + cumul += count; + Dialog d = new Dialog(frame, "Dialog " + + cumul, true); + d.setLayout(new BorderLayout()); + d.add(new Button("button " + count), BorderLayout.CENTER); + d.pack(); + toDispose.add(d); + lastDialog = d; + EventQueue.invokeLater(r); + d.setVisible(true); + if (xlastDialog != null) { + xlastDialog.setVisible(false); + } else { + if (cumul < MAX_COUNT) { + count = 0; + lastDialog = null; + EventQueue.invokeLater(r); + } + } + } else { + try { + Thread.sleep(1000); + } catch (InterruptedException ignore) { + } + lastDialog.setVisible(false); + lastDialog = null; + } + } + }; + try { + EventQueue.invokeAndWait(r); + } catch (InterruptedException ignore) { + } catch (Exception e) { + throw new RuntimeException("Unexpected exception: " + + e.getLocalizedMessage()); + } + while (cumul < MAX_COUNT - 1) { + try { + Thread.sleep(1000); + } catch (InterruptedException ignore) {} + } + System.out.println("Test PASSED"); + } finally { + try { + EventQueue.invokeAndWait(() -> { + frame.setVisible(false); + frame.dispose(); + for (Window w: toDispose) { + w.dispose(); + } + }); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); + } + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogLocationTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogLocationTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/DialogLocationTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/DialogLocationTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,176 @@ +/* + * Copyright (c) 1999, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4101437 + @summary Dialog.setLocation(int,int) works unstable when the dialog is visible + @key headful + @run main DialogLocationTest +*/ + +import java.awt.AWTException; +import java.awt.Container; +import java.awt.Dialog; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.GraphicsEnvironment; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.lang.reflect.InvocationTargetException; +import java.util.Random; + +public class DialogLocationTest extends Panel { + private volatile int count = 0; + private Dialog my_dialog; + private volatile boolean waitingForEvent = false; + private volatile int newX, newY; + Random random = new Random(); + + public void init() { + Container f = getParent(); + + while (!(f instanceof Frame)) { + f = f.getParent(); + } + + my_dialog = new Dialog((Frame) f, "TestDialog"); + my_dialog.setSize(150, 100); + + setSize(200, 200); + } + + public void start() throws InterruptedException, + InvocationTargetException { + Robot robot; + try { + robot = new Robot(); + EventQueue.invokeAndWait(() -> { + my_dialog.setLocationRelativeTo(null); + my_dialog.setVisible(true); + }); + robot.waitForIdle(); + robot.delay(1000); + my_dialog.addComponentListener(new CL()); + setDialogLocation(my_dialog); + } catch (AWTException e) { + throw new RuntimeException(e); + } finally { + EventQueue.invokeAndWait(() -> { + my_dialog.setVisible(false); + my_dialog.dispose(); + }); + } + } + + public void setDialogLocation(Dialog dialog) { + int height, width, insetX, insetY; + Point curLoc; + int i; + + Rectangle screen = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getMaximumWindowBounds(); + height = screen.height; + width = screen.width; + insetX = screen.x; + insetY = screen.y; + + for (i = 0; i < 100; i++) { + newX = random.nextInt(width - 300 - insetX) + insetX; + newY = random.nextInt(height - 400 - insetY) + insetY; + + if (newX == 0 && newY == 0) { + i--; + continue; + } + + waitingForEvent = true; + + EventQueue.invokeLater(() -> { + dialog.setLocation(newX, newY); + }); + + while (waitingForEvent) { + Thread.yield(); + } + + curLoc = dialog.getLocation(); + if (curLoc.x != newX || curLoc.y != newY) { + count++; + System.out.println("Failed on iteration " + i + " expect:[" + newX + "," + newY + "] reported:[" + curLoc.x + "," + + curLoc.y + "] diff:[" + (curLoc.x - newX) + "," + (curLoc.y - newY) + "]"); + System.out.flush(); + } + } + + if (count > 0) { + throw new RuntimeException("Dialog Location was set incorrectly"); + } + } + + public class CL extends ComponentAdapter { + int lastX, lastY; + + public void componentMoved(ComponentEvent e) { + if (e.getComponent() == my_dialog) { + Point eventLoc = e.getComponent().getLocation(); + if (lastX != eventLoc.x || lastY != eventLoc.y) { + lastX = eventLoc.x; + lastY = eventLoc.y; + if (newX != 0 && newY != 0 && (eventLoc.x != newX || eventLoc.y != newY)) { + count++; + System.out.println("Failed in componentMoved() expect:[" + newX +"," + newY + "] reported: [" + + eventLoc.x + "," + eventLoc.y + "] diff [" + (eventLoc.x - newX) + "," + (eventLoc.y - newY) + "]"); + System.out.flush(); + } + waitingForEvent = false; + } + } + } + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + Frame frame = new Frame("DialogLocationTest"); + try { + DialogLocationTest test = new DialogLocationTest(); + EventQueue.invokeAndWait(() -> { + frame.add(test); + test.init(); + frame.setVisible(true); + }); + test.start(); + } finally { + EventQueue.invokeLater(() -> { + frame.setVisible(false); + frame.dispose(); + }); + } + } +} + diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/ModalDialogOnNonEdt.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/ModalDialogOnNonEdt.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/ModalDialogOnNonEdt.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/ModalDialogOnNonEdt.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2002, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4636311 4645035 + @summary Modal dialog shown on EDT after modal dialog on EDT doesn't receive mouse events + @key headful + @run main ModalDialogOnNonEdt +*/ + +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.EventQueue; +import java.awt.Robot; +import java.awt.Point; +import java.awt.Dimension; +import java.awt.Window; +import java.awt.event.InputEvent; +import java.awt.AWTException; +import java.awt.event.MouseEvent; +import java.awt.event.MouseAdapter; +import java.util.ArrayList; +import java.util.List; + +public class ModalDialogOnNonEdt { + + public void start () { + ShowModalDialog showModalDialog = new ShowModalDialog(); + + try { + EventQueue.invokeLater(showModalDialog); + Robot robot = new Robot(); + robot.delay(2000); + + Point origin = ShowModalDialog.lastShownDialog.getLocationOnScreen(); + Dimension dim = ShowModalDialog.lastShownDialog.getSize(); + robot.mouseMove((int)origin.getX() + (int)dim.getWidth()/2, + (int)origin.getY() + (int)dim.getHeight()/2); + robot.mousePress(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + + robot.delay(2000); + if (ShowModalDialog.count < 2) { + throw new RuntimeException("TEST FAILED: second modal dialog was not shown"); + } + + /* click on second modal dialog to verify if it receives mouse events */ + synchronized (ShowModalDialog.monitor) { + origin = ShowModalDialog.lastShownDialog.getLocationOnScreen(); + dim = ShowModalDialog.lastShownDialog.getSize(); + robot.mouseMove((int)origin.getX() + (int)dim.getWidth()/2, + (int)origin.getY() + (int)dim.getHeight()/2); + robot.mousePress(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + + ShowModalDialog.monitor.wait(2000); + } + + if (ShowModalDialog.count < 3) { + throw new RuntimeException("TEST FAILED: second modal dialog didn't receive mouse events"); + } + + } catch (AWTException e) { + e.printStackTrace(); + throw new RuntimeException("Some AWTException occurred"); + } catch (InterruptedException e) { + e.printStackTrace(); + throw new RuntimeException("Test was interrupted"); + } finally { + for (Window w : ShowModalDialog.toDispose) { + w.setVisible(false); + w.dispose(); + } + } + + System.out.println("TEST PASSED"); + } + + public static void main(String[] args) { + new ModalDialogOnNonEdt().start(); + } +} + +class ShowModalDialog implements Runnable { + static volatile int count = 0; + static Object monitor = new Object(); + static Dialog lastShownDialog; + static List toDispose = new ArrayList<>(); + + public void run() { + count++; + Frame frame = new Frame("Frame #" + count); + toDispose.add(frame); + Dialog dialog = new Dialog(frame, "Modal Dialog #" + count, true); + dialog.setSize(100, 100); + dialog.setLocation(100, 100*count); + dialog.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent me) { + System.out.println(me.toString()); + if (ShowModalDialog.count < 2) { + Runnable runner = new ShowModalDialog(); + new Thread(runner).start(); + } else { + synchronized (monitor) { + ShowModalDialog.count++; + monitor.notifyAll(); + } + } + } + }); + lastShownDialog = dialog; + toDispose.add(dialog); + dialog.setVisible(true); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/NewMessagePumpTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/NewMessagePumpTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Dialog/NewMessagePumpTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Dialog/NewMessagePumpTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 1998, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4119383 + @summary Tests total rewrite of modality blocking model + @key headful + @run main/timeout=30 NewMessagePumpTest +*/ + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Panel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.lang.reflect.InvocationTargetException; + +public class NewMessagePumpTest { + public void start() { + Frame1 frame = new Frame1(); + frame.validate(); + frame.setVisible(true); + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + NewMessagePumpTest test = new NewMessagePumpTest(); + EventQueue.invokeAndWait(test::start); + } +} + +class Frame1 extends Frame { + Frame1() { + try { + jbInit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void jbInit() throws Exception { + MyPanel panel1 = new MyPanel(this); + this.setLayout(new BorderLayout()); + this.setSize(new Dimension(400, 300)); + this.setLocationRelativeTo(null); + this.setTitle("Frame Title"); + panel1.setLayout(new BorderLayout()); + this.add(panel1, BorderLayout.CENTER); + } +} + +class Dialog1 extends Dialog { + BorderLayout borderLayout1 = new BorderLayout(); + Button button1 = new Button(); + + Dialog1(Frame f) { + super(f, true); + try { + jbInit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + void jbInit() throws Exception { + button1.setLabel("close"); + button1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + button1_actionPerformed(e); + } + }); + this.setLayout(borderLayout1); + this.add(button1, BorderLayout.NORTH); + } + + void button1_actionPerformed(ActionEvent e) { + dispose(); + } +} + +class MyPanel extends Panel { + Frame frame; + + MyPanel(Frame f) { + frame = f; + } + + public void addNotify() { + super.addNotify(); + System.out.println("AddNotify bringing up modal dialog..."); + final Dialog1 dlg = new Dialog1(frame); + dlg.pack(); + new Thread(() -> { + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + try { + EventQueue.invokeAndWait(() -> { + dlg.setVisible(false); + dlg.dispose(); + }); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); + } + }).start(); + dlg.setVisible(true); + frame.setVisible(false); + frame.dispose(); + System.out.println("Test passed"); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/FontClass/DrawStringWithInfiniteXform.java openjdk-lts-11.0.22+7/test/jdk/java/awt/FontClass/DrawStringWithInfiniteXform.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/FontClass/DrawStringWithInfiniteXform.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/FontClass/DrawStringWithInfiniteXform.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, 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 @@ -24,13 +24,13 @@ * @test * @bug 8023213 * @summary Font/Text APIs should not crash/takes long time - * if transform includes INIFINITY + * if transform includes INFINITY * @run main DrawStringWithInfiniteXform */ -import java.awt.*; -import java.awt.font.*; -import java.awt.geom.*; -import java.awt.image.*; +import java.awt.Font; +import java.awt.Graphics2D; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; import java.util.Timer; import java.util.TimerTask; @@ -41,15 +41,22 @@ class ScheduleTask extends TimerTask { public void run() { - if (!done) { - throw new - RuntimeException("drawString with InfiniteXform transform takes long time"); + System.out.println("Task running at " + System.currentTimeMillis()); + System.out.flush(); + synchronized (DrawStringWithInfiniteXform.class) { + System.out.println( + "Checking done at " + System.currentTimeMillis()); + System.out.flush(); + if (!done) { + throw new RuntimeException( + "drawString with InfiniteXform transform takes long time"); + } } } } public DrawStringWithInfiniteXform() { timer = new Timer(); - timer.schedule(new ScheduleTask(), 20000); + timer.schedule(new ScheduleTask(), 30000); } public static void main(String [] args) { @@ -58,11 +65,15 @@ } private void start() { + System.out.println("start at " + System.currentTimeMillis()); + System.out.flush(); float[] vals = new float[6]; - for (int i=0;i<6;i++) vals[i]=Float.POSITIVE_INFINITY; + for (int i=0; i<6; i++) { + vals[i] = Float.POSITIVE_INFINITY; + } AffineTransform nanTX = new AffineTransform(vals); - BufferedImage bi = new BufferedImage(1,1,BufferedImage.TYPE_INT_RGB); + BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = bi.createGraphics(); g2d.rotate(Float.POSITIVE_INFINITY); @@ -73,8 +84,12 @@ g2d.setFont(xfiniteFont); g2d.drawString("abc", 20, 20); } - done = true; - timer.cancel(); + System.out.println("Loop done at " + System.currentTimeMillis()); + System.out.flush(); + synchronized (DrawStringWithInfiniteXform.class) { + done = true; + timer.cancel(); + } System.out.println("Test passed"); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/FontClass/FontScalerRoundTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/FontClass/FontScalerRoundTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/FontClass/FontScalerRoundTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/FontClass/FontScalerRoundTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8299255 + * @summary Verify no round error in Font scaling + */ + +import java.awt.Font; +import java.awt.Graphics2D; +import java.awt.font.FontRenderContext; +import java.awt.font.LineMetrics; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; + +public class FontScalerRoundTest { + public static void main(String[] args) { + final double SCALE = 4096.0; + final double STEP = 0.0001; + final double LIMIT = STEP * 100.0; + + BufferedImage img = new BufferedImage(100, 100, + BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = img.createGraphics(); + FontRenderContext frc = g2d.getFontRenderContext(); + + Font font = new Font(Font.DIALOG, Font.PLAIN, 1); + float h1 = getScaledHeight(font, frc, SCALE); + float h2 = getScaledHeight(font, frc, SCALE + STEP); + float diff = Math.abs(h1 - h2); + + if (diff > LIMIT) { + throw new RuntimeException("Font metrix had round error " + + h1 + "," + h2); + } + } + + private static float getScaledHeight(Font font, + FontRenderContext frc, + double scale) { + AffineTransform at = new AffineTransform(scale, 0.0, 0.0, scale, + 0.0, 0.0); + Font transFont = font.deriveFont(at); + LineMetrics m = transFont.getLineMetrics("0", frc); + return m.getHeight(); + } +} + diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Frame/ALTTABIconBeingErased/ALTTABIconBeingErased.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Frame/ALTTABIconBeingErased/ALTTABIconBeingErased.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Frame/ALTTABIconBeingErased/ALTTABIconBeingErased.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Frame/ALTTABIconBeingErased/ALTTABIconBeingErased.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2006, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Color; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; +import javax.swing.SwingUtilities; + +/* + * @test + * @bug 6435804 + * @summary REGRESSION: NetBeans 5.0 icon no longer shows up when you alt-tab on XP + * @key headful + * @requires (os.family != "mac") + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual ALTTABIconBeingErased + */ + +public class ALTTABIconBeingErased { + + private static final String INSTRUCTIONS = + "This test verifies that the Frame's icon is not corrupted after showing\n" + + "and disposing owned dialog\n" + + "You would see a button in a Frame.\n" + + "1) The frame should have icon with 2 black and 2 white squares.\n" + + "2) Verify that icon appearing on ALT-TAB is also a\n" + + "light icon.\n" + + "3) Now open a child by pressing on \"Open Child\" button.\n" + + "Child Dialog should appear. It should have the same icon as frame.\n" + + "4) Now close the dialog by pressing Space or clicking on a button in it.\n" + + "Dialog should be disposed now.\n" + + "5) Verify that icon on ALT-TAB is the same as before"; + + private static Frame frame; + private static final int SIZE = 300; + + private static void updateIconImage() { + BufferedImage image = new BufferedImage(SIZE, SIZE, BufferedImage.TYPE_INT_ARGB); + + Graphics gr = image.createGraphics(); + gr.setColor(Color.WHITE); + gr.fillRect(0, 0, SIZE, SIZE); + + gr.setColor(Color.BLACK); + gr.fillRect(0, 0, SIZE / 2, SIZE / 2); + gr.fillRect(SIZE / 2, SIZE / 2, SIZE, SIZE); + + frame.setIconImage(image); + } + + private static void createAndShowGUI(){ + frame = new Frame(); + Button setImageButton5 = new Button("Open Child"); + updateIconImage(); + + setImageButton5.addActionListener(event -> { + try { + final Dialog d1 = new Dialog(frame, true); + d1.setSize(100, 100); + Button ok = new Button("OK"); + ok.addActionListener(e -> { + d1.setVisible(false); + d1.dispose(); + }); + d1.add(ok); + d1.setLocation(frame.getX(), frame.getY() + 70); + d1.setVisible(true); + } catch (Exception e) { + throw new RuntimeException("Test failed because of" + + " exception" + e + ". Press Fail."); + } + }); + + frame.add(setImageButton5, BorderLayout.CENTER); + frame.setSize(200,65); + + PassFailJFrame.addTestWindow(frame); + PassFailJFrame.positionTestWindow(frame, + PassFailJFrame.Position.HORIZONTAL); + frame.setVisible(true); + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + PassFailJFrame passFailJFrame = new PassFailJFrame("Large Icon " + + "Test Instructions", INSTRUCTIONS, 5, 12, 50); + SwingUtilities.invokeAndWait(ALTTABIconBeingErased::createAndShowGUI); + passFailJFrame.awaitAndCheck(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Frame/AwtFramePackTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Frame/AwtFramePackTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Frame/AwtFramePackTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Frame/AwtFramePackTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.AWTException; +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.Menu; +import java.awt.MenuBar; +import java.awt.Panel; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import javax.imageio.ImageIO; + +/* + * @test + * @bug 8265586 + * @key headful + * @summary Tests whether correct native frame insets are obtained + * for Resizable & Non-Resizable AWT Frame by checking the actual + * and expected/preferred frame sizes. + * @run main AwtFramePackTest + */ +public class AwtFramePackTest { + private static Frame frame; + private static Robot robot; + private static StringBuffer errorLog = new StringBuffer(); + + public static void main(String[] args) throws AWTException { + robot = new Robot(); + robot.setAutoDelay(300); + + // Resizable frame + createAWTFrame(true); + + robot.waitForIdle(); + robot.delay(500); + + // Non-Resizable frame + createAWTFrame(false); + + if (errorLog != null && errorLog.length() > 0) { + throw new RuntimeException("Test failed due to the following" + + " one or more errors: \n" + errorLog); + } + } + + private static void createAWTFrame(boolean isResizable) { + try { + frame = new Frame(); + frame.setLayout(new BorderLayout()); + + Panel panel = new Panel(); + panel.add(new Button("Panel Button B1")); + panel.add(new Button("Panel Button B2")); + frame.add(panel, BorderLayout.CENTER); + + MenuBar mb = new MenuBar(); + Menu m = new Menu("Menu"); + mb.add(m); + frame.setMenuBar(mb); + + frame.setResizable(isResizable); + frame.pack(); + frame.setVisible(true); + + robot.waitForIdle(); + robot.delay(500); + + Dimension actualFrameSize = frame.getSize(); + Dimension expectedFrameSize = frame.getPreferredSize(); + + if (!actualFrameSize.equals(expectedFrameSize)) { + String frameType = isResizable ? "ResizableFrame" : "NonResizableFrame"; + System.out.println("Expected frame size: " + expectedFrameSize); + System.out.println("Actual frame size: " + actualFrameSize); + saveScreenCapture(frameType + ".png"); + errorLog.append(frameType + ": Expected and Actual frame size" + + " are different. frame.pack() does not work!! \n"); + } + } finally { + if (frame != null) { + frame.dispose(); + } + } + } + + // for debugging purpose, saves screen capture when test fails. + private static void saveScreenCapture(String filename) { + BufferedImage image = robot.createScreenCapture(frame.getBounds()); + try { + ImageIO.write(image,"png", new File(filename)); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconChangingTest/IconChangingTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconChangingTest/IconChangingTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconChangingTest/IconChangingTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconChangingTest/IconChangingTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2006, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Color; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.Window; +import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; + +import static java.awt.image.BufferedImage.TYPE_INT_ARGB; +import static jdk.test.lib.Platform.isWindows; + +/* + * @test + * @bug 6415057 + * @summary Tests if toplevel's icons are updated in runtime + * @key headful + * @requires (os.family == "windows") + * @modules java.desktop/sun.awt + * @library /java/awt/regtesthelpers /test/lib + * @build PassFailJFrame jdk.test.lib.Platform + * @run main/manual IconChangingTest + */ + +public class IconChangingTest { + private static final int ICON_SIZE = 16; + private static final int MARGIN = 2; + private static final int STACK_SIZE = 4; + // Number of windows per stack + private static final int WIN_PER_STACK = 4; + private static int windowPosX = 0; + + private static final int EXTRA_OFFSET = 50; + + private static ImageIcon ii1; + private static ImageIcon ii2; + private static ImageIcon ji; + + private static final Window[][] windowStack = new Window[STACK_SIZE][WIN_PER_STACK]; + private static final JLabel[][] labels = new JLabel[STACK_SIZE][WIN_PER_STACK]; + private static final boolean[][] isResizable = new boolean[][]{ + {true, true, false, true}, //stack 1 + {true, false, true, false}, //stack 2 + {true, false, true, true}, //stack 3 + {false, true, false, false} //stack 4 + }; + + private static final String INSTRUCTIONS = + "The test is supposed to work on Windows.\n"+ + "It may not work on other platforms.\n"+ + " \n"+ + "Icons and window decorations should change in windows\n"+ + "(frames & dialogs) every 3 seconds.\n"+ + " \n"+ + "Notes:\n"+ + " \n"+ + " * Icons might appear in grayscale.\n"+ + " * Default icon might be either Duke or Java Cup.\n"+ + " \n"+ + "Press PASS if the icons match the labels\n"+ + "and are shown correctly, FAIL otherwise.\n" + ; + + public static void main(String[] args) throws Exception { + PassFailJFrame passFailJFrame = new PassFailJFrame("Icon Changing " + + "Test Instructions", INSTRUCTIONS, 5, 18, 40); + SwingUtilities.invokeAndWait(() -> { + try { + createAndShowGUI(); + } catch (Exception e) { + throw new RuntimeException("Error while running the test", e); + } + }); + passFailJFrame.awaitAndCheck(); + } + + private static void createAndShowGUI() throws InterruptedException, + InvocationTargetException { + PassFailJFrame.positionTestWindow(null, + PassFailJFrame.Position.TOP_LEFT_CORNER); + Rectangle bounds = PassFailJFrame.getInstructionFrameBounds(); + windowPosX = bounds.x + bounds.width; + + ii1 = new ImageIcon(generateIcon(Color.RED)); + ii2 = new ImageIcon(generateIcon(Color.BLUE)); + ji = new ImageIcon(IconChangingTest.class.getResource("java-icon16.png")); + + // Creates STACK_SIZE different combinations of window stacks, + // each stack contains WIN_PER_STACK windows (frame/dialog). + for (int i = 0; i < STACK_SIZE; i++) { + for (int j = 0; j < WIN_PER_STACK; j++) { + createWindow(i, j); + } + } + + Thread thread = new Thread(new Runnable() { + private final ImageIcon[][] icons = { + {null, ii1}, + {ii2, null}, + {ii1, ii2} + }; + + @Override + public void run() { + int index = 0; + while (true) { + try { + setIcons(icons[index][0], icons[index][1]); + Thread.sleep(4000); + if (++index >= icons.length) { + index = 0; + } + } catch (InterruptedException e) { + break; + } + } + } + + private void setIcons(final ImageIcon icon1, final ImageIcon icon2) { + Image i1 = (icon1 == null) ? null : icon1.getImage(); + Image i2 = (icon2 == null) ? null : icon2.getImage(); + ImageIcon li1 = (icon1 == null) ? ji : icon1; + ImageIcon li2 = (icon2 == null) ? li1 : icon2; + + ImageIcon[][] iconList = new ImageIcon[][]{ + {li1, li1, ((i2 == null && isWindows()) ? null : li2), li2}, + {li1, (isWindows()) ? null : li1, li2, (isWindows()) ? null : li2}, + {li1, (isWindows()) ? null : li1, li2, li2}, + {li1, li1, (i2 == null && isWindows()) ? null : li2, (isWindows()) ? null : li2}, + }; + + for (int i = 0; i < STACK_SIZE; i++) { + windowStack[i][0].setIconImage(i1); + windowStack[i][2].setIconImage(i2); + for (int j = 0; j < WIN_PER_STACK; j++) { + labels[i][j].setIcon(iconList[i][j]); + } + } + } + }); + thread.start(); + } + + private static void createWindow(int i, int j) { + boolean isFrame = (i == 0 && j == 0) || (i == 1 && j == 0); + String title = (isFrame ? "Frame ": "Dialog ") + (i+1) + "." + (j+1); + + windowStack[i][j] = isFrame + ? createFrame(title, i, j) + : createDialog(title, i, j); + + labels[i][j]= new JLabel(title); + windowStack[i][j].add(labels[i][j]); + windowStack[i][j].setBounds(windowPosX + (i * 200), (j * 100) + EXTRA_OFFSET, + 200, 100); + windowStack[i][j].toFront(); + windowStack[i][j].setVisible(true); + + PassFailJFrame.addTestWindow(windowStack[i][j]); + } + + private static Frame createFrame(String title, int i, int j) { + Frame frame = new Frame(title); + frame.setResizable(isResizable[i][j]); + return frame; + } + + private static Dialog createDialog(String title, int i, int j) { + Dialog dialog = new Dialog((j == 0 ? null : windowStack[i][j-1]), title); + dialog.setResizable(isResizable[i][j]); + return dialog; + } + + private static Image generateIcon(Color color) { + BufferedImage bImg = new BufferedImage(ICON_SIZE, ICON_SIZE, TYPE_INT_ARGB); + Graphics2D g2d = bImg.createGraphics(); + g2d.setColor(color); + g2d.fillRect(MARGIN, MARGIN, ICON_SIZE - 2 * MARGIN, ICON_SIZE - 2 * MARGIN); + g2d.dispose(); + return bImg; + } +} Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconChangingTest/java-icon16.png and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconChangingTest/java-icon16.png differ diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconShowingTest/IconShowingTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconShowingTest/IconShowingTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconShowingTest/IconShowingTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconShowingTest/IconShowingTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Dialog; +import java.awt.Font; +import java.awt.Frame; +import java.awt.GradientPaint; +import java.awt.Graphics2D; +import java.awt.GridLayout; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.Window; +import java.awt.image.BaseMultiResolutionImage; +import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.List; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; + +import static java.awt.image.BufferedImage.TYPE_INT_ARGB; +import static jdk.test.lib.Platform.isWindows; + +/* + * @test + * @bug 6233560 6280303 6292933 + * @summary Tests if toplevel's icons are shown correctly + * @key headful + * @requires (os.family == "windows") + * @library /java/awt/regtesthelpers /test/lib + * @build PassFailJFrame jdk.test.lib.Platform + * @run main/manual IconShowingTest + */ + +public class IconShowingTest { + private static final int EXTRA_OFFSET = 50; + + private static final String INSTRUCTIONS = + "Look at the icons shown on frames and dialogs, icons of minimized frames\n" + + (isWindows() ? "are displayed in ALT+TAB window\n" : "") + "\n"+ + "Alpha-channel (transparency) should be supported\n"+ + "by Windows and may not be supported by other platforms.\n"+ + " \n"+ + "Notes:\n"+ + " * Icons might appear in grayscale.\n"+ + " * Default icon might be either Duke or Java Cup.\n"+ + " \n"+ + "Press PASS if the icons match label description in windows\n"+ + "and are shown correctly, FAIL otherwise.\n" + ; + + public static void main(String[] args) throws Exception { + PassFailJFrame passFailJFrame = new PassFailJFrame("Icon Showing " + + "Test Instructions", INSTRUCTIONS, 5, 18, 48); + SwingUtilities.invokeAndWait(() -> { + try { + createAndShowGUI(); + } catch (Exception e) { + throw new RuntimeException("Error while running the test", e); + } + }); + passFailJFrame.awaitAndCheck(); + } + + public static void createAndShowGUI() + throws InterruptedException, InvocationTargetException { + Image i_16 = createIcon(16, 8, "16"); + Image i_32 = createIcon(32, 14, "32"); + Image i_48 = createIcon(48, 24, "48"); + Image i_64 = createIcon(64, 30, "64"); + + ImageIcon ji_16 = new ImageIcon(IconShowingTest.class.getResource( + "java-icon16.png")); + + Image[] images = new Image[] {i_16, i_32, i_48, i_64}; + List imageList = Arrays.asList(images); + ImageIcon icon = new ImageIcon(new MRImage(images)); + + Frame f1 = new Frame("Frame 1"); + f1.setIconImages(imageList); + f1.setLayout(new GridLayout(0, 1)); + + f1.add(new JLabel("Icon 16x16", new ImageIcon(i_16), JLabel.CENTER)); + f1.add(new JLabel("Icon 32x32", new ImageIcon(i_32), JLabel.CENTER)); + f1.add(new JLabel("Icon 48x48", new ImageIcon(i_48), JLabel.CENTER)); + f1.add(new JLabel("Icon 64x64", new ImageIcon(i_64), JLabel.CENTER)); + + PassFailJFrame.positionTestWindow(null, + PassFailJFrame.Position.TOP_LEFT_CORNER); + Rectangle bounds = PassFailJFrame.getInstructionFrameBounds(); + + int windowPosX = bounds.x + bounds.width + 5; + f1.setBounds(windowPosX, EXTRA_OFFSET, 200, 300); + f1.setVisible(true); + f1.toFront(); + PassFailJFrame.addTestWindow(f1); + int windowPosY = f1.getY() + f1.getHeight(); + + + Dialog d11 = new Dialog(f1, "Dialog 1.1"); + d11.setResizable(false); + addIconAndLabelToWindow(d11, windowPosX, windowPosY - EXTRA_OFFSET, + (isWindows() ? "No icon, non-resizable dialog" + : "Inherited icon, non-resizable dialog"), + (isWindows() ? null : icon)); + + Dialog d12 = new Dialog(d11, "Dialog 1.2"); + addIconAndLabelToWindow(d12, windowPosX, windowPosY + EXTRA_OFFSET, + "Inherited icon, resizable dialog", icon); + + Frame f2 = new Frame("Frame 2"); + addIconAndLabelToWindow(f2, windowPosX + 200, 0, + "Default Icon", ji_16); + + Dialog d21 = new Dialog(f2, "Dialog 2.1"); + d21.setResizable(false); + addIconAndLabelToWindow(d21, windowPosX + 200, 100, + (isWindows() ? "No icon, non-resizable dialog" + : "Inherited default Icon, non-resizable dialog"), + (isWindows() ? null : ji_16)); + + Dialog d22 = new Dialog(f2, "Dialog 2.2"); + addIconAndLabelToWindow(d22, windowPosX + 200, 200, + "Inherited default Icon, resizable dialog", ji_16); + + Dialog d23 = new Dialog(f2, "Dialog 2.3"); + d23.setIconImages(imageList); + d23.setResizable(false); + addIconAndLabelToWindow(d23, windowPosX + 200, 300, + "Modified Icon, non-resizable dialog", icon); + + Dialog d24 = new Dialog(f2, "Dialog 2.4"); + d24.setIconImages(imageList); + addIconAndLabelToWindow(d24, windowPosX + 200, 400, + "Modified Icon, resizable dialog", icon); + + Dialog d31 = new Dialog((Frame)null, "Dialog 3.1"); + addIconAndLabelToWindow(d31, windowPosX + 400, 100, + "Default icon, resizable dialog", ji_16); + + Dialog d32 = new Dialog(d31, "Dialog 3.2"); + d32.setResizable(false); + addIconAndLabelToWindow(d32, windowPosX + 400, 200, + (isWindows() ? "No icon, non-resizable dialog" + : "Default Icon, non-resizable dialog"), + (isWindows() ? null : ji_16)); + + Dialog d33 = new Dialog(d31, "Dialog 3.3"); + d33.setIconImages(imageList); + d33.setResizable(false); + addIconAndLabelToWindow(d33, windowPosX + 400, 300, + "Modified icon, non-resizable dialog", icon); + + + Dialog d34 = new Dialog(d33, "Dialog 3.4"); + d34.setResizable(false); + addIconAndLabelToWindow(d34, windowPosX + 400, 400, + (isWindows() ? "No icon, non-resizable dialog" + : "Inherited modified icon, non-resizable dialog"), + (isWindows() ? null : icon)); + + + Dialog d41 = new Dialog((Frame) null, "Dialog 4.1"); + d41.setResizable(false); + addIconAndLabelToWindow(d41, windowPosX + 600, 100, + "Default icon, non-resizable dialog", ji_16); + + + Dialog d42 = new Dialog(d41, "Dialog 4.2"); + addIconAndLabelToWindow(d42, windowPosX + 600, 200, + "Inherited default icon, resizable dialog", ji_16); + + Dialog d43 = new Dialog(d41, "Dialog 4.3"); + d43.setIconImages(imageList); + addIconAndLabelToWindow(d43, windowPosX + 600, 300, + "Modified icon, resizable dialog", icon); + + Dialog d44 = new Dialog(d43, "Dialog 4.4"); + addIconAndLabelToWindow(d44, windowPosX + 600, 400, + "Inherited modified icon, resizable dialog", icon); + } + + private static void addIconAndLabelToWindow(Window win, int x, int y, + String title, ImageIcon icon) { + win.setBounds(x, (y + EXTRA_OFFSET), 200, 100); + win.add(new JLabel(title, icon, JLabel.CENTER)); + win.setVisible(true); + win.toFront(); + PassFailJFrame.addTestWindow(win); + } + + public static Image createIcon(int size, int fontSize, String value) { + BufferedImage bImg = new BufferedImage(size, size, TYPE_INT_ARGB); + Graphics2D g2d = bImg.createGraphics(); + + int half = size / 2; + for (int i = 0; i < half - 1; i += 2) { + g2d.setComposite(AlphaComposite.Src); + g2d.setColor(Color.RED); + g2d.fillRect(0, i, half, 1); + g2d.setComposite(AlphaComposite.Clear); + g2d.fillRect(0, i + 1, half, 1); + } + g2d.setComposite(AlphaComposite.Clear); + g2d.fillRect(half, 0, half, half); + g2d.setComposite(AlphaComposite.Src); + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + g2d.setFont(new Font("Dialog", Font.PLAIN, fontSize)); + g2d.setColor(Color.BLUE); + g2d.drawString(value, half - 1, half - 2); + + int height = (half + 1) / 3; + // Green + GradientPaint greenGradient = new GradientPaint(0, half - 1, Color.GREEN, + size, half - 1, new Color(0, 255, 0, 0)); + g2d.setPaint(greenGradient); + g2d.fillRect(0, half - 1, size, height); + + // Blue + GradientPaint blueGradient = new GradientPaint(0, (half - 1) + height, Color.BLUE, + size, (half - 1) + height, new Color(0, 0, 255, 0)); + g2d.setPaint(blueGradient); + g2d.fillRect(0, (half - 1) + height, size, height); + + // Red + GradientPaint redGradient = new GradientPaint(0, (half - 1) + height * 2, Color.RED, + size, (half - 1) + height * 2, new Color(255, 0, 0, 0)); + g2d.setPaint(redGradient); + g2d.fillRect(0, (half - 1) + height * 2, size, height); + g2d.dispose(); + + return bImg; + } + + private static class MRImage extends BaseMultiResolutionImage { + public MRImage(Image... resolutionVariants) { + super(resolutionVariants); + } + + @Override + public Image getResolutionVariant(double expectedSize, double unused) { + final int size = (int) Math.round(expectedSize / 16.0) * 16; + List imageList = getResolutionVariants(); + for (int i = 0; i < imageList.size(); i++) { + if (size == imageList.get(i).getWidth(null)) { + return imageList.get(i); + } else if (imageList.get(i).getWidth(null) > size) { + return imageList.get(i > 0 ? i - 1 : i); + } + } + return imageList.get(0); //default/base image + } + } +} Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconShowingTest/java-icon16.png and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconShowingTest/java-icon16.png differ diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconTransparencyTest/IconTransparencyTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconTransparencyTest/IconTransparencyTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/IconTransparencyTest/IconTransparencyTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/IconTransparencyTest/IconTransparencyTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2005, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.AlphaComposite; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.awt.image.WritableRaster; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; + +import static java.awt.image.BufferedImage.TYPE_INT_ARGB; + +/* + * @test + * @bug 4987171 + * @key headful + * @summary GIF transparency in frame icons not work with Metacity/GNOME + * @requires (os.family != "mac") + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual IconTransparencyTest + */ + +public class IconTransparencyTest { + private static final String INSTRUCTIONS = + "The icon of the frame and the resized icon in the label should be transparent.\n"+ + "Transparency can be verified by checking if the background color (pink)\n"+ + "is visible in and around icon within the JLabel.\n"+ + " \n"+ + "Press continue to view next icon (6 total).\n"+ + "Icon might be presented as grayscale image.\n"+ + " \n"+ + "For the 3rd icon in JLabel, the 2nd vertical slot is transparent, hence\n"+ + "the background color (pink) should be visible at the 2nd vertical slot.\n"+ + " \n"+ + "For the 4th icon in JLabel, the 5th vertical slot is transparent, hence\n"+ + "the background color (pink) should be visible at the 5th vertical slot.\n"+ + " \n"+ + "Press Pass or Fail at the end of test.\n"; + + static class TestLabel extends JLabel { + public void paint(Graphics g) { + Dimension d = getSize(); + g.setColor(Color.PINK); + g.fillRect(0, 0, d.width, d.height); + Icon icon = getIcon(); + if (icon != null) { + icon.paintIcon(this, g, 0, 0); + } + int iw = (icon != null) ? icon.getIconWidth() + 3 : 3; + if (d.width - iw > 0) { + g.setColor(Color.BLACK); + g.drawString(getText(), iw, 16); + } + } + } + + static class TestFrame implements ActionListener { + static final int TEST_CNT = 6; + int currTest = 0; + static ImageIcon[] testIcon; + + TestLabel label; + JButton button; + static JFrame frame; + + final String[] testText = { + "1st Icon: Size 16x16, GIF", + "2nd Icon: Size 48x48, GIF", + "3rd Icon: Size 64x64, GIF", + "4th Icon: Size 64x64, GIF", + "5th Icon: Size 64x64, PNG", + "No Icon (system default)" + }; + + TestFrame() throws IOException { + + generateIcon(16, "img_16.gif", 13, 15, 1, "gif"); + generateIcon(48, "img_48.gif", 36, 40, 4, "gif"); + generateIcon(64, "img_64.png", 50, 58, 4, "png"); + + // gif created with GREEN selected as transparent color index in IndexColorModel + generateGIFWithIndexColorModel(64, "greenTransparent.gif", 1); + // gif created with BLACK selected as transparent color index in IndexColorModel + generateGIFWithIndexColorModel(64, "blackTransparent.gif", 4); + + testIcon = new ImageIcon[] { + new ImageIcon("img_16.gif"), + new ImageIcon("img_48.gif"), + new ImageIcon("greenTransparent.gif"), + new ImageIcon("blackTransparent.gif"), + new ImageIcon("img_64.png"), + null + }; + } + + public void createAndShowGUI() { + frame = new JFrame(); + //create hint label + label = new TestLabel(); + label.setVisible(true); + frame.add(label, BorderLayout.WEST); + + //create button + button = new JButton("Continue"); + button.setVisible(true); + button.addActionListener(this); + frame.add(button, BorderLayout.EAST); + + //show first sample + frame.setIconImage(testIcon[0].getImage()); + label.setIcon(testIcon[0]); + label.setText(testText[0]); + frame.pack(); + + PassFailJFrame.addTestWindow(frame); + PassFailJFrame.positionTestWindow(frame, + PassFailJFrame.Position.HORIZONTAL); + frame.setVisible(true); + } + + public void actionPerformed(ActionEvent event) { + currTest++; + if (currTest < TEST_CNT) { + if (testIcon[currTest] != null) { + frame.setIconImage(testIcon[currTest].getImage()); + } else { + frame.setIconImage(null); + } + + label.setIcon(testIcon[currTest]); + label.setText(testText[currTest]); + } else { + button.setEnabled(false); + button.setText("No more icons left."); + } + frame.revalidate(); + frame.pack(); + } + } + + public static void main(String[] args) throws Exception { + TestFrame testFrame = new TestFrame(); + PassFailJFrame passFailJFrame = new PassFailJFrame("Icon Transparency " + + "Test Instructions", INSTRUCTIONS, 5, 16, 46); + SwingUtilities.invokeAndWait(testFrame::createAndShowGUI); + passFailJFrame.awaitAndCheck(); + } + + public static void generateIcon(int size, String filename, int fontSize, + int yText, int lnHeight, String type) throws IOException { + BufferedImage bImg = new BufferedImage(size, size, TYPE_INT_ARGB); + Graphics2D g2d = bImg.createGraphics(); + g2d.setComposite(AlphaComposite.Clear); + g2d.fillRect(0, 0, size, size); + + g2d.setComposite(AlphaComposite.Src); + g2d.setColor(Color.BLUE); + g2d.fillRect(0, 0, size, lnHeight); + g2d.setColor(Color.GREEN); + g2d.fillRect(0, lnHeight * 2, size, lnHeight); + + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); + g2d.setFont(new Font("Dialog", Font.PLAIN, fontSize)); + g2d.setColor(Color.RED); + g2d.drawString("TR", 0, yText); + g2d.dispose(); + + ImageIO.write(bImg, type, new File(filename)); + } + + protected static void generateGIFWithIndexColorModel(int size, String filename, + int transparentColorIndex) throws IOException { + IndexColorModel icm = createIndexedBitmaskColorModel(transparentColorIndex); + BufferedImage img = new BufferedImage(size, size, + BufferedImage.TYPE_BYTE_INDEXED, icm); + int mapSize = icm.getMapSize(); + int width = 64 / mapSize; + + WritableRaster wr = img.getRaster(); + for (int i = 0; i < mapSize; i++) { + for (int y = 0; y < 64; y++) { + for (int x = 0; x < width; x++) { + wr.setSample(i * width + x, y, 0, i); + } + } + } + ImageIO.write(img, "gif", new File(filename)); + } + + protected static IndexColorModel createIndexedBitmaskColorModel(int transparentColorIndex) { + int paletteSize = 8; + byte[] red = new byte[paletteSize]; + byte[] green = new byte[paletteSize]; + byte[] blue = new byte[paletteSize]; + + red[0] = (byte)0xff; green[0] = (byte)0x00; blue[0] = (byte)0x00; //red + red[1] = (byte)0x00; green[1] = (byte)0xff; blue[1] = (byte)0x00; //green + red[2] = (byte)0x00; green[2] = (byte)0x00; blue[2] = (byte)0xff; //blue + red[3] = (byte)0xff; green[3] = (byte)0xff; blue[3] = (byte)0xff; //white + red[4] = (byte)0x00; green[4] = (byte)0x00; blue[4] = (byte)0x00; //black + red[5] = (byte)0x80; green[5] = (byte)0x80; blue[5] = (byte)0x80; //grey + red[6] = (byte)0xff; green[6] = (byte)0xff; blue[6] = (byte)0x00; //yellow + red[7] = (byte)0x00; green[7] = (byte)0xff; blue[7] = (byte)0xff; //cyan + + int numBits = 3; + + return new IndexColorModel(numBits, paletteSize, + red, green, blue, transparentColorIndex); + } +} + diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/SetLargeIconTest/SetLargeIconTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/SetLargeIconTest/SetLargeIconTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Icon/SetLargeIconTest/SetLargeIconTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Icon/SetLargeIconTest/SetLargeIconTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2006, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.image.BufferedImage; +import java.util.ArrayList; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; + +/* + * @test + * @key headful + * @bug 6425089 + * @summary PIT. Frame does not show a big size jpg image as icon + * @requires (os.family != "mac") + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual SetLargeIconTest + */ + +public class SetLargeIconTest { + private static final String INSTRUCTIONS = + "Case 1: Press \"Pass\" button if this frame does not have icon with green color.\n"+ + " \n"+ + "Case 2: Press \"Change to red\" if the frame icon is in green color.\n"+ + "For case 2, press \"Pass\" button if green icon changes to a larger red icon,\n"+ + "press \"Fail\" otherwise.\n"; + private static JFrame frame; + + private static void createAndShowGUI() { + frame = new JFrame(); + + setColoredIcon(Color.green, 128, 128); + JButton btnChangeIcon = new JButton("Change to red"); + btnChangeIcon.addActionListener(e -> setColoredIcon(Color.red, 400, 400)); + + frame.add(btnChangeIcon, BorderLayout.CENTER); + frame.setSize(200,65); + + PassFailJFrame.addTestWindow(frame); + PassFailJFrame.positionTestWindow(frame, + PassFailJFrame.Position.HORIZONTAL); + frame.setVisible(true); + } + + private static void setColoredIcon(Color color, int width, int height) { + BufferedImage image = new BufferedImage(400, 400, BufferedImage.TYPE_INT_ARGB); + Graphics gr = image.createGraphics(); + gr.setColor(color); + gr.fillRect(0, 0, width, height); + + ArrayList imageList = new java.util.ArrayList<>(); + imageList.add(image); + + frame.setIconImages(imageList); + } + + public static void main(String[] args) throws Exception { + PassFailJFrame passFailJFrame = new PassFailJFrame("Large Icon " + + "Test Instructions", INSTRUCTIONS, 5, 8, 50); + SwingUtilities.invokeAndWait(SetLargeIconTest::createAndShowGUI); + passFailJFrame.awaitAndCheck(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -34,11 +34,23 @@ * @run main DragWindowTest */ -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Window; +import java.awt.event.InputEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; -import java.util.concurrent.*; +import java.util.concurrent.Callable; import test.java.awt.regtesthelpers.Util; @@ -55,7 +67,7 @@ public static void main(String[] args) throws Exception { Robot robot = new Robot(); - robot.setAutoDelay(50); + robot.setAutoDelay(100); SwingUtilities.invokeAndWait(new Runnable() { @@ -65,6 +77,7 @@ } }); + robot.delay(250); robot.waitForIdle(); Point pointToClick = Util.invokeOnEDT(new Callable() { @@ -134,6 +147,7 @@ panel.add(button, BorderLayout.CENTER); frame.getContentPane().add(panel); + frame.setLocationRelativeTo(null); frame.setVisible(true); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/PopupMenu/PopupMenuLocation.java openjdk-lts-11.0.22+7/test/jdk/java/awt/PopupMenu/PopupMenuLocation.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/PopupMenu/PopupMenuLocation.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/PopupMenu/PopupMenuLocation.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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 @@ -33,10 +33,13 @@ import java.awt.Robot; import java.awt.Toolkit; import java.awt.event.InputEvent; +import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.awt.event.*; +import java.io.File; +import java.util.stream.IntStream; +import javax.imageio.ImageIO; -/** +/* * @test * @key headful * @bug 8160270 @@ -47,43 +50,59 @@ private static final int SIZE = 350; public static final String TEXT = "Long-long-long-long-long-long-long text in the item-"; + public static final int OFFSET = 50; private static volatile boolean action = false; + private static Robot robot; + private static Frame frame; + private static Rectangle screenBounds; + public static void main(final String[] args) throws Exception { + robot = new Robot(); + robot.setAutoDelay(200); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] sds = ge.getScreenDevices(); for (GraphicsDevice sd : sds) { GraphicsConfiguration gc = sd.getDefaultConfiguration(); - Rectangle bounds = gc.getBounds(); - Point point = new Point(bounds.x, bounds.y); + screenBounds = gc.getBounds(); Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc); - while (point.y < bounds.y + bounds.height - insets.bottom - SIZE) { - while (point.x - < bounds.x + bounds.width - insets.right - SIZE) { + Point point = new Point(screenBounds.x + insets.left, + screenBounds.y + insets.top); + final int yBound = screenBounds.y + screenBounds.height + - insets.bottom - SIZE; + final int xBound = screenBounds.x + screenBounds.width + - insets.right - SIZE; + while (point.y < yBound) { + while (point.x < xBound) { test(point); - point.translate(bounds.width / 5, 0); + point.translate(screenBounds.width / 5, 0); } - point.setLocation(bounds.x, point.y + bounds.height / 5); + point.setLocation(screenBounds.x, + point.y + screenBounds.height / 5); } } } - private static void test(final Point tmp) throws Exception { + private static void test(final Point loc) { + frame = new Frame(); PopupMenu pm = new PopupMenu(); - for (int i = 1; i < 7; i++) { - pm.add(TEXT + i); - } - pm.addActionListener(e -> action = true); - Frame frame = new Frame(); + IntStream.rangeClosed(1, 6).forEach(i -> pm.add(TEXT + i)); + pm.addActionListener(e -> { + action = true; + System.out.println(" Got action event " + e); + }); + try { + frame.setUndecorated(true); frame.setAlwaysOnTop(true); frame.setLayout(new FlowLayout()); frame.add(pm); frame.pack(); frame.setSize(SIZE, SIZE); + frame.setLocation(loc); frame.setVisible(true); - frame.setLocation(tmp.x, tmp.y); + frame.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { show(e); @@ -105,23 +124,37 @@ } } - private static void openPopup(final Frame frame) throws Exception { - Robot robot = new Robot(); - robot.setAutoDelay(200); + private static void openPopup(final Frame frame) { robot.waitForIdle(); Point pt = frame.getLocationOnScreen(); - robot.mouseMove(pt.x + frame.getWidth() / 2, pt.y + 50); + int x = pt.x + frame.getWidth() / 2; + int y = pt.y + OFFSET; + robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON3_DOWN_MASK); robot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK); - int x = pt.x + frame.getWidth() / 2; - int y = pt.y + 130; + robot.delay(200); + y += OFFSET; robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); robot.waitForIdle(); if (!action) { - throw new RuntimeException(); + captureScreen(); + throw new RuntimeException( + "Failed, didn't receive the PopupMenu ActionEvent on " + + "frame= " + frame + ", isFocused = " + frame.isFocused()); } action = false; } + + private static void captureScreen() { + try { + ImageIO.write(robot.createScreenCapture(screenBounds), + "png", + new File("screen.png")); + } catch (Exception e) { + e.printStackTrace(); + } + } + } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/TextComponent/PeerlessSetCaret/PeerlessSetCaret.java openjdk-lts-11.0.22+7/test/jdk/java/awt/TextComponent/PeerlessSetCaret/PeerlessSetCaret.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/TextComponent/PeerlessSetCaret/PeerlessSetCaret.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/TextComponent/PeerlessSetCaret/PeerlessSetCaret.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2003, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4257143 + @summary RFE: Cannot set some AWT properties until peer has been created + @key headful +*/ + +import java.awt.EventQueue; +import java.awt.TextArea; +import java.awt.TextField; + +public class PeerlessSetCaret { + public static void main(String[] args) throws Exception { + EventQueue.invokeAndWait(() -> { + TextField tf = new TextField("Hello, World!"); + TextArea ta = new TextArea("Hello, World!"); + + // without the fix these will throw IllegalComponentStateException + tf.setCaretPosition(1); + ta.setCaretPosition(1); + }); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/TextComponent/SelectionBounds/SelectionBounds.java openjdk-lts-11.0.22+7/test/jdk/java/awt/TextComponent/SelectionBounds/SelectionBounds.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/TextComponent/SelectionBounds/SelectionBounds.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/TextComponent/SelectionBounds/SelectionBounds.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,107 @@ +/* + * Copyright (c) 1999, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4118247 + @summary Make sure bounds are enforced correctly on + TextComponent.Select(int, int) + @key headful +*/ + +import java.awt.EventQueue; +import java.awt.TextArea; +import java.awt.TextComponent; + +public class SelectionBounds { + public static TextComponent tc; + + public static int[][] index = { + {0, 0}, // 0 = selectionStart = selectionEnd + {5, 5}, // selectionStart = selectionEnd + {5, 7}, // 0 < selectionStart < selectionEnd < textLength + {-50, 7}, // selectionStart < 0 < selectionEnd < textLength + {-50, 50}, // selectionStart < 0 < textLength < selectionEnd + {5, 50}, // 0 < selectionStart < textLength < selectionEnd + {40, 50}, // 0 < textLength < selectionStart < selectionEnd + {-50, -40}, // selectionStart < selectionEnd < 0 < textLength + {7, 5}, // 0 < selectionEnd < selectionStart < textLength + {7, -50}, // selectionEnd < 0 < selectionStart < textLength + {50, -50}, // selectionEnd < 0 < textLength < selectionStart + {50, 5}, // 0 < selectionEnd < textLength < selectionStart + {50, 40}, // 0 < textLength < selectionEnd < selectionStart + {-40, -50} // selectionEnd < selectionStart < 0 < textLength + }; + + public static String[] selections = { + "", + "", + "56", + "0123456", + "0123456789", + "56789", + "", + "", + "", + "", + "", + "", + "", + "" + }; + + + public static void main(String[] args) throws Exception { + EventQueue.invokeAndWait(() -> { + tc = new TextArea("0123456789"); + runTheTest(); + }); + } + + private static void runTheTest() { + int i; + String str1; + + for (i=0; i { + aDialog = new Dialog(new Frame()); + aDialog.setTitle("ADialog"); + aDialog.setBackground(Color.lightGray); + aDialog.setLayout(new BorderLayout()); + Panel mainPanel = new Panel(); + mainPanel.setLayout(new BorderLayout(6, 6)); + area = new TextArea(atextCRLF, 25, 68, + TextArea.SCROLLBARS_VERTICAL_ONLY); + area.setFont(new Font("Monospaced", Font.PLAIN, 11)); + mainPanel.add(area, "Center"); + aDialog.add(mainPanel, "Center"); + aDialog.pack(); + System.out.println("before: "+hexEncode(atextCRLF)); + System.out.println(" after: "+hexEncode(area.getText())); + res = area.getText().equals(atextCRLF); + System.out.println("01: " + res + "\n"); + passed = passed && res; + area.setText(atextCRLF); + System.out.println("before: "+hexEncode(atextCRLF)); + System.out.println(" after: "+hexEncode(area.getText())); + res = area.getText().equals(atextCRLF); + System.out.println("02: " + res + "\n"); + passed = passed && res; + + area.setText(""); + atext = "row1"; + area.append(atext+"\r"); + area.append(atext+"\r"); + System.out.println("before: " + +hexEncode(atext+"\r" + atext+"\r")); + System.out.println(" after: "+hexEncode(area.getText())); + res = area.getText().equals(atext + atext); + System.out.println("03: " + res + "\n"); + passed = passed && res; + + area.setText(""); + String atext1 = "fine."; + String atext2 = "messed up."; + atext = atext1 +"\r\n"+ atext2; + for (int i = 0; i < atext.length(); i++) { + area.append(atext.substring(i, i+1)); + } + System.out.println("before: " + +hexEncode(atext1 +"\r\n"+ atext2)); + System.out.println(" after: "+hexEncode(area.getText())); + String s = area.getText(); + String t = s.substring(s.length()-atext2.length()); + res = t.equals(atext2); + System.out.println("04: " + res); + passed = passed && res; + + area.setText(""); + atext = "\r"; + area.append(atext); + System.out.println("before: "+hexEncode(atext)); + System.out.println(" after: "+hexEncode(area.getText())); + res = area.getText().equals(""); + System.out.println("05: " + res + "\n"); + passed = passed && res; + + if (System.getProperty("os.name").toUpperCase(). + startsWith("WIN")) { + if (!passed) { + throw new RuntimeException("TextAreaCRLFTest FAILED."); + } else { + System.out.println("TextAreaCRLFTest PASSED"); + } + } else { + System.out.println("This is a Windows oriented testcase."); + } + }); + } finally { + EventQueue.invokeAndWait(() -> { + if (aDialog != null) { + aDialog.dispose(); + } + }); + } + } + + private static String hexEncode(String str) { + return hexEncode(str.getBytes()); + } + + private static String hexEncode(byte[] bytes) { + StringBuffer buffer = new StringBuffer(bytes.length * 2); + for (int i = 0; i < bytes.length; i++) { + byte b = bytes[i]; + buffer.append(DIGITS[(b & 0xF0) >> 4]); + buffer.append(DIGITS[b & 0x0F]); + } + return buffer.toString(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2000, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4290704 + @summary Test use of AWTEventListenerProxyTest class +*/ + +import java.awt.AWTEvent; +import java.awt.EventQueue; +import java.awt.Toolkit; +import java.awt.event.AWTEventListener; +import java.awt.event.AWTEventListenerProxy; +import java.util.EventListener; + +public class AWTEventListenerProxyTest { + public static void main(String[] args) throws Exception { + EventQueue.invokeAndWait(() -> { + Toolkit tk = Toolkit.getDefaultToolkit(); + if ("sun.awt.X11.XToolkit".equals(tk.getClass().getName())) { + System.out.println("Do not test for XAWT Toolkit."); + System.out.println("Passing automatically."); + return; + } + + // check that if no listeners added, returns a 0-length array, + // not null + AWTEventListener[] array1 = tk.getAWTEventListeners(); + if (array1 == null || array1.length != 0) { + System.out.println("[Empty array test failed!!]"); + throw new RuntimeException("Test failed -" + + " didn't return 0-sized array"); + } + System.out.println("[Empty array test passed]"); + + // simple add/get test + DumbListener dl1 = new DumbListener(); + final long dl1MASK = AWTEvent.ACTION_EVENT_MASK; + tk.addAWTEventListener(dl1, dl1MASK); + + array1 = tk.getAWTEventListeners(); + if (array1 == null || array1.length != 1) { + System.out.println("[Simple add/get test failed!!]"); + throw new RuntimeException("Test failed - didn't " + + "return array of 1"); + } + AWTEventListenerProxy dp1 = (AWTEventListenerProxy) array1[0]; + EventListener getdl1 = dp1.getListener(); + if (getdl1 != dl1) { + System.out.println("[Simple add/get test failed - " + + "wrong listener!!]"); + throw new RuntimeException("Test failed - wrong " + + "listener in proxy"); + } + + long getmask = dp1.getEventMask(); + if (getmask != dl1MASK) { + System.out.println("[Simple add/get test failed - " + + "wrong mask!!]"); + throw new RuntimeException("Test failed - wrong mask in proxy"); + } + System.out.println("[Simple add/get test passed]"); + + // add the same listener inside a proxy, with a different mask + // should get back one listener, with the ORed mask + final long dl2MASK = AWTEvent.CONTAINER_EVENT_MASK; + AWTEventListenerProxy newp = new AWTEventListenerProxy(dl2MASK, + dl1); + tk.addAWTEventListener(newp, dl2MASK); + array1 = tk.getAWTEventListeners(); + if (array1.length != 1) { + System.out.println("[Proxy add/get test failed!!]"); + throw new RuntimeException("Test failed - added proxy, " + + "but didn't return array of 1"); + } + dp1 = (AWTEventListenerProxy) array1[0]; + getdl1 = dp1.getListener(); + if (getdl1 != dl1) { + System.out.println("[Proxy add/get test " + + "failed - wrong listener!!]"); + throw new RuntimeException("Test failed - added proxy, " + + "wrong listener in proxy"); + } + getmask = dp1.getEventMask(); + if (getmask != (dl1MASK | dl2MASK)) { + System.out.println("[Proxy add/get test failed - " + + "wrong mask!!]"); + throw new RuntimeException("Test failed - added proxy, " + + "wrong mask in proxy"); + } + System.out.println("[Proxy add/get test passed]"); + + // add some other listener + DumbListener dl3 = new DumbListener(); + final long dl3MASK = AWTEvent.FOCUS_EVENT_MASK; + tk.addAWTEventListener(dl3, dl3MASK); + + // test getting with a mask for a listener already added + array1 = tk.getAWTEventListeners(dl1MASK); + if (array1.length != 1) { + System.out.println("[Get w/ mask test failed!! - " + + "not 1 listener!]"); + throw new RuntimeException("Test failed - tried to " + + "get w/ mask"); + } + dp1 = (AWTEventListenerProxy) array1[0]; + getdl1 = dp1.getListener(); + if (getdl1 != dl1) { + System.out.println("[Get w/ mask test failed!! - " + + "wrong listener]"); + throw new RuntimeException("Test failed - tried to get " + + "w/ mask, wrong listener in proxy"); + } + System.out.println("[Get w/ mask test passed]"); + + // test getting with a mask for a listener not added + array1 = tk.getAWTEventListeners(AWTEvent.MOUSE_EVENT_MASK); + if (array1.length != 0) { + System.out.println("[Get w/ mask test 2 failed!! - " + + "not 0 listeners!]"); + throw new RuntimeException("Test failed - tried to get " + + "w/ mask 2"); + } + System.out.println("[Get w/ mask test 2 passed]"); + + + // test getting with a compound mask for a listener already added + array1 = tk.getAWTEventListeners(dl1MASK | dl2MASK); + if (array1.length != 1) { + System.out.println("[Get w/ compound mask test failed!! - " + + "not 1 listeners!]"); + throw new RuntimeException("Test failed - tried to get w/ 2 " + + "ORed masks"); + } + dp1 = (AWTEventListenerProxy) array1[0]; + getdl1 = dp1.getListener(); + if (getdl1 != dl1) { + System.out.println("[Get w/ compound mask test failed!! - " + + "wrong listener]"); + throw new RuntimeException("Test failed - tried to get w/ " + + "compound mask, wrong listener in proxy"); + } + System.out.println("[Get w/ compound mask test passed]"); + }); + } + + public static class DumbListener implements AWTEventListener { + public DumbListener() {} + public void eventDispatched(AWTEvent e) {} + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/Toolkit/ListenersDeadlockTest/ListenerDeadlockTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/Toolkit/ListenersDeadlockTest/ListenerDeadlockTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/Toolkit/ListenersDeadlockTest/ListenerDeadlockTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/Toolkit/ListenersDeadlockTest/ListenerDeadlockTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2000, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 4338463 + @summary excessive synchronization in notifyAWTEventListeners leads to + deadlock +*/ + +import java.awt.AWTEvent; +import java.awt.EventQueue; +import java.awt.Panel; +import java.awt.Toolkit; +import java.awt.event.AWTEventListener; +import java.awt.event.ActionEvent; + +public class ListenerDeadlockTest { + public static final Object lock = new Object(); + + public static final Toolkit toolkit = Toolkit.getDefaultToolkit(); + + public static Panel panel = new Panel(); + + public static final AWTEventListener listener = new AWTEventListener() { + public void eventDispatched(AWTEvent e) { + if (e.getSource() == panel) { + System.out.println(e); + System.out.println("No deadlock"); + synchronized(lock) { + lock.notifyAll(); + } + } + } + }; + + public static void main(String[] args) throws Exception { + EventQueue.invokeAndWait(() -> { + toolkit.addAWTEventListener(listener, -1); + + Thread thread = new Thread(new Runnable() { + public void run() { + synchronized (toolkit) { + synchronized (lock) { + try { + lock.notifyAll(); + lock.wait(); + } catch (InterruptedException ex) { + } + } + } + } + }); + + synchronized (lock) { + thread.start(); + try { + lock.wait(); + } catch (InterruptedException ex) { + } + } + + panel.dispatchEvent(new ActionEvent(panel, + ActionEvent.ACTION_PERFORMED, "Try")); + }); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -81,6 +81,10 @@ PassFailJFrame passFailJFrame = new PassFailJFrame("TrayIcon " + "Test Instructions", INSTRUCTIONS, 8, 18, 85); createAndShowGUI(); + // does not have a test window, + // hence only the instruction frame is positioned + PassFailJFrame.positionTestWindow(null, + PassFailJFrame.Position.HORIZONTAL); try { passFailJFrame.awaitAndCheck(); } finally { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -65,8 +65,8 @@ public class NoFormatsDropTest implements AWTEventListener { Frame frame; - DragSourcePanel dragSourcePanel; - DropTargetPanel dropTargetPanel; + volatile DragSourcePanel dragSourcePanel; + volatile DropTargetPanel dropTargetPanel; static final int FRAME_ACTIVATION_TIMEOUT = 1000; static final int DROP_COMPLETION_TIMEOUT = 1000; @@ -103,7 +103,6 @@ InvocationTargetException { try { Robot robot = new Robot(); - robot.setAutoWaitForIdle(true); robot.delay(FRAME_ACTIVATION_TIMEOUT); final Point srcPoint = dragSourcePanel.getLocationOnScreen(); @@ -134,6 +133,7 @@ robot.mouseMove(curPoint.x, curPoint.y); robot.delay(100); } + robot.waitForIdle(); robot.keyRelease(KeyEvent.VK_CONTROL); robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); @@ -244,7 +244,7 @@ class DropTargetPanel extends Panel implements DropTargetListener { final Dimension preferredDimension = new Dimension(200, 100); - boolean passed = false; + volatile boolean passed = false; public DropTargetPanel() { setDropTarget(new DropTarget(this, this)); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java openjdk-lts-11.0.22+7/test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2022, 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 @@ -25,13 +25,20 @@ @test @key headful @bug 6497426 - @summary ests that pressing of Ctrl+ascii mostly fires KEY_TYPED with a Unicode control symbols - @run main CtrlASCII + @summary Tests that pressing of Ctrl+ascii mostly fires KEY_TYPED with a Unicode control symbols + @run main/timeout=600 CtrlASCII */ -import java.awt.*; -import java.awt.event.*; -import java.util.*; +import java.awt.AWTException; +import java.awt.BorderLayout; +import java.awt.Frame; +import java.awt.Point; +import java.awt.Robot; +import java.awt.TextField; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.util.HashMap; // // In this test, a key listener for KEY_TYPED checks if a character typed has @@ -42,136 +49,135 @@ // produce a unicode character, so there will be no KEY_TYPED and no problem. // Test doesn't try to verify Ctrl+deadkey behavior. // -public class CtrlASCII extends Frame implements KeyListener -{ +public class CtrlASCII extends Frame implements KeyListener { // Declare things used in the test, like buttons and labels here - static Hashtable keycharHash = new Hashtable(); - static boolean testFailed = false; - //Frame frame; + static final HashMap KEYCHAR_MAP = new HashMap<>(); + static volatile boolean testFailed = false; + TextField tf; Robot robot; - static void fillHash( boolean isMSWindows ) { - keycharHash.put( (char)0x20 , KeyEvent.VK_SPACE ); /*32,x20*/ /*' ' */ - keycharHash.put( (char)0x21 , KeyEvent.VK_EXCLAMATION_MARK ); /*33,x21*/ /*'!' fr*/ - keycharHash.put( (char)0x22 , KeyEvent.VK_QUOTEDBL ); /*34,x22*/ /*'"' fr*/ - keycharHash.put( (char)0x23 , KeyEvent.VK_NUMBER_SIGN ); /*35,x23*/ /*'#' de*/ - keycharHash.put( (char)0x24 , KeyEvent.VK_DOLLAR ); /*36,x24*/ /*'$', de_CH*/ - //keycharHash.put('%', (char)0x25 ); /*37,x25*/ /*no VK, cannot test*/ - keycharHash.put( (char)0x26 , KeyEvent.VK_AMPERSAND ); /*38,x26*/ /*'&', fr*/ - keycharHash.put( (char)0x27 , KeyEvent.VK_QUOTE ); /*39,x27*/ /*''', fr*/ - keycharHash.put( (char)0x28 , KeyEvent.VK_LEFT_PARENTHESIS ); /*40,x28*/ /*'(', fr*/ - keycharHash.put( (char)0x29 , KeyEvent.VK_RIGHT_PARENTHESIS ); /*41,x29*/ /*')', fr*/ - keycharHash.put( (char)0x2a , KeyEvent.VK_ASTERISK ); /*42,x2a*/ /*'*', fr*/ - keycharHash.put( (char)0x2b , KeyEvent.VK_PLUS ); /*43,x2b*/ /*'+', de*/ - keycharHash.put( (char)0x2c , KeyEvent.VK_COMMA ); /*44,x2c*/ /*','*/ - keycharHash.put( (char)0x2d , KeyEvent.VK_MINUS ); /*45,x2d*/ /*'-'*/ - keycharHash.put( (char)0x2e , KeyEvent.VK_PERIOD ); /*46,x2e*/ /*'.'*/ - keycharHash.put( (char)0x2f , KeyEvent.VK_SLASH ); /*47,x2f*/ /*'/'*/ - keycharHash.put( (char)0x30 , KeyEvent.VK_0 ); /*48,x30*/ - keycharHash.put( (char)0x31 , KeyEvent.VK_1 ); /*49,x31*/ - keycharHash.put( (char)0x32 , KeyEvent.VK_2 ); /*50,x32*/ - keycharHash.put( (char)0x33 , KeyEvent.VK_3 ); /*51,x33*/ - keycharHash.put( (char)0x34 , KeyEvent.VK_4 ); /*52,x34*/ - keycharHash.put( (char)0x35 , KeyEvent.VK_5 ); /*53,x35*/ - keycharHash.put( (char)0x36 , KeyEvent.VK_6 ); /*54,x36*/ - keycharHash.put( (char)0x37 , KeyEvent.VK_7 ); /*55,x37*/ - keycharHash.put( (char)0x38 , KeyEvent.VK_8 ); /*56,x38*/ - keycharHash.put( (char)0x39 , KeyEvent.VK_9 ); /*57,x39*/ - keycharHash.put( (char)0x3a , KeyEvent.VK_COLON ); /*58,x3a*/ /*':', fr*/ - keycharHash.put( (char)0x3b , KeyEvent.VK_SEMICOLON ); /*59,x3b*/ /*';'*/ - keycharHash.put( (char)0x3c , KeyEvent.VK_LESS ); /*60,x3c*/ /*'<' us 102*/ - keycharHash.put( (char)0x3d , KeyEvent.VK_EQUALS ); /*61,x3d*/ - keycharHash.put( (char)0x3e , KeyEvent.VK_GREATER ); /*62,x3e*/ /*'>' ?????? where???*/ - // Javadoc says: "there is no keycode for the question mark because - // there is no keyboard for which it appears on the primary layer." - // Well, it's Lithuanian standard. - //keycharHash.put('?', (char)0x3f ); /*63,x3f*/ /*no VK, cannot test*/ - keycharHash.put( (char)0x40 , KeyEvent.VK_AT ); /*64,x40*/ /*'@' ?????? where???*/ - keycharHash.put( (char)0x1 , KeyEvent.VK_A ); /*65,x41*/ - keycharHash.put( (char)0x2 , KeyEvent.VK_B ); /*66,x42*/ - keycharHash.put( (char)0x3 , KeyEvent.VK_C ); /*67,x43*/ - keycharHash.put( (char)0x4 , KeyEvent.VK_D ); /*68,x44*/ - keycharHash.put( (char)0x5 , KeyEvent.VK_E ); /*69,x45*/ - keycharHash.put( (char)0x6 , KeyEvent.VK_F ); /*70,x46*/ - keycharHash.put( (char)0x7 , KeyEvent.VK_G ); /*71,x47*/ - keycharHash.put( (char)0x8 , KeyEvent.VK_H ); /*72,x48*/ - keycharHash.put( (char)0x9 , KeyEvent.VK_I ); /*73,x49*/ - keycharHash.put( (char)0xa , KeyEvent.VK_J ); /*74,x4a*/ - keycharHash.put( (char)0xb , KeyEvent.VK_K ); /*75,x4b*/ - keycharHash.put( (char)0xc , KeyEvent.VK_L ); /*76,x4c*/ - keycharHash.put( (char)0xd , KeyEvent.VK_M ); /*77,x4d*/ - keycharHash.put( (char)0xe , KeyEvent.VK_N ); /*78,x4e*/ - keycharHash.put( (char)0xf , KeyEvent.VK_O ); /*79,x4f*/ - keycharHash.put( (char)0x10 , KeyEvent.VK_P ); /*80,x50*/ - keycharHash.put( (char)0x11 , KeyEvent.VK_Q ); /*81,x51*/ - keycharHash.put( (char)0x12 , KeyEvent.VK_R ); /*82,x52*/ - keycharHash.put( (char)0x13 , KeyEvent.VK_S ); /*83,x53*/ - keycharHash.put( (char)0x14 , KeyEvent.VK_T ); /*84,x54*/ - keycharHash.put( (char)0x15 , KeyEvent.VK_U ); /*85,x55*/ - keycharHash.put( (char)0x16 , KeyEvent.VK_V ); /*86,x56*/ - keycharHash.put( (char)0x17 , KeyEvent.VK_W ); /*87,x57*/ - keycharHash.put( (char)0x18 , KeyEvent.VK_X ); /*88,x58*/ - keycharHash.put( (char)0x19 , KeyEvent.VK_Y ); /*89,x59*/ - keycharHash.put( (char)0x1a , KeyEvent.VK_Z ); /*90,x5a*/ - - keycharHash.put( (char)0x1b , KeyEvent.VK_OPEN_BRACKET ); /*91,x5b*/ /*'['*/ - keycharHash.put( (char)0x1c , KeyEvent.VK_BACK_SLASH ); /*92,x5c*/ /*'\'*/ - keycharHash.put( (char)0x1d , KeyEvent.VK_CLOSE_BRACKET ); /*93,x5d*/ /*']'*/ - keycharHash.put( (char)0x5e , KeyEvent.VK_CIRCUMFLEX ); /*94,x5e*/ /*'^' ?? nodead fr, de??*/ - keycharHash.put( (char)0x1f , KeyEvent.VK_UNDERSCORE ); /*95,x5f*/ /*'_' fr*/ - keycharHash.put( (char)0x60 , KeyEvent.VK_BACK_QUOTE ); /*96,x60*/ - /********* Same as uppercase*/ - //keycharHash.put( (char)0x1 , KeyEvent.VK_a );/*97,x61*/ - //keycharHash.put( (char)0x2 , KeyEvent.VK_b );/*98,x62*/ - //keycharHash.put( (char)0x3 , KeyEvent.VK_c );/*99,x63*/ - //keycharHash.put( (char)0x4 , KeyEvent.VK_d );/*100,x64*/ - //keycharHash.put( (char)0x5 , KeyEvent.VK_e );/*101,x65*/ - //keycharHash.put( (char)0x6 , KeyEvent.VK_f );/*102,x66*/ - //keycharHash.put( (char)0x7 , KeyEvent.VK_g );/*103,x67*/ - //keycharHash.put( (char)0x8 , KeyEvent.VK_h );/*104,x68*/ - //keycharHash.put( (char)0x9 , KeyEvent.VK_i );/*105,x69*/ - //keycharHash.put( (char)0xa , KeyEvent.VK_j );/*106,x6a*/ - //keycharHash.put( (char)0xb , KeyEvent.VK_k );/*107,x6b*/ - //keycharHash.put( (char)0xc , KeyEvent.VK_l );/*108,x6c*/ - //keycharHash.put( (char)0xd , KeyEvent.VK_m );/*109,x6d*/ - //keycharHash.put( (char)0xe , KeyEvent.VK_n );/*110,x6e*/ - //keycharHash.put( (char)0xf , KeyEvent.VK_o );/*111,x6f*/ - //keycharHash.put( (char)0x10 , KeyEvent.VK_p );/*112,x70*/ - //keycharHash.put( (char)0x11 , KeyEvent.VK_q );/*113,x71*/ - //keycharHash.put( (char)0x12 , KeyEvent.VK_r );/*114,x72*/ - //keycharHash.put( (char)0x13 , KeyEvent.VK_s );/*115,x73*/ - //keycharHash.put( (char)0x14 , KeyEvent.VK_t );/*116,x74*/ - //keycharHash.put( (char)0x15 , KeyEvent.VK_u );/*117,x75*/ - //keycharHash.put( (char)0x16 , KeyEvent.VK_v );/*118,x76*/ - //keycharHash.put( (char)0x17 , KeyEvent.VK_w );/*119,x77*/ - //keycharHash.put( (char)0x18 , KeyEvent.VK_x );/*120,x78*/ - //keycharHash.put( (char)0x19 , KeyEvent.VK_y );/*121,x79*/ - //keycharHash.put( (char)0x1a , KeyEvent.VK_z );/*122,x7a*/ - - keycharHash.put( (char)0x7b , KeyEvent.VK_BRACELEFT ); /*123,x7b*/ /*'{' la (Latin American)*/ - //keycharHash.put( (char)0x1c , KeyEvent.VK_| ); /*124,x7c*/ /* no VK, cannot test*/ - keycharHash.put( (char)0x7d , KeyEvent.VK_BRACERIGHT ); /*125,x7d*/ /*'}' la */ - //keycharHash.put( (char)0x1e , KeyEvent.VK_~ ); /*126,x7e*/ /* no VK, cannot test*/ - + static void fillHash() { + KEYCHAR_MAP.put((char) 0x20, KeyEvent.VK_SPACE); /*32,x20*/ /*' ' */ + KEYCHAR_MAP.put((char) 0x21, KeyEvent.VK_EXCLAMATION_MARK); /*33,x21*/ /*'!' fr*/ + KEYCHAR_MAP.put((char) 0x22, KeyEvent.VK_QUOTEDBL); /*34,x22*/ /*'"' fr*/ + KEYCHAR_MAP.put((char) 0x23, KeyEvent.VK_NUMBER_SIGN); /*35,x23*/ /*'#' de*/ + KEYCHAR_MAP.put((char) 0x24, KeyEvent.VK_DOLLAR); /*36,x24*/ /*'$', de_CH*/ + //keycharHash.put('%', (char)0x25 ); /*37,x25*/ /*no VK, cannot test*/ + KEYCHAR_MAP.put((char) 0x26, KeyEvent.VK_AMPERSAND); /*38,x26*/ /*'&', fr*/ + KEYCHAR_MAP.put((char) 0x27, KeyEvent.VK_QUOTE); /*39,x27*/ /*''', fr*/ + KEYCHAR_MAP.put((char) 0x28, KeyEvent.VK_LEFT_PARENTHESIS); /*40,x28*/ /*'(', fr*/ + KEYCHAR_MAP.put((char) 0x29, KeyEvent.VK_RIGHT_PARENTHESIS); /*41,x29*/ /*')', fr*/ + KEYCHAR_MAP.put((char) 0x2a, KeyEvent.VK_ASTERISK); /*42,x2a*/ /*'*', fr*/ + KEYCHAR_MAP.put((char) 0x2b, KeyEvent.VK_PLUS); /*43,x2b*/ /*'+', de*/ + KEYCHAR_MAP.put((char) 0x2c, KeyEvent.VK_COMMA); /*44,x2c*/ /*','*/ + KEYCHAR_MAP.put((char) 0x2d, KeyEvent.VK_MINUS); /*45,x2d*/ /*'-'*/ + KEYCHAR_MAP.put((char) 0x2e, KeyEvent.VK_PERIOD); /*46,x2e*/ /*'.'*/ + KEYCHAR_MAP.put((char) 0x2f, KeyEvent.VK_SLASH); /*47,x2f*/ /*'/'*/ + KEYCHAR_MAP.put((char) 0x30, KeyEvent.VK_0); /*48,x30*/ + KEYCHAR_MAP.put((char) 0x31, KeyEvent.VK_1); /*49,x31*/ + KEYCHAR_MAP.put((char) 0x32, KeyEvent.VK_2); /*50,x32*/ + KEYCHAR_MAP.put((char) 0x33, KeyEvent.VK_3); /*51,x33*/ + KEYCHAR_MAP.put((char) 0x34, KeyEvent.VK_4); /*52,x34*/ + KEYCHAR_MAP.put((char) 0x35, KeyEvent.VK_5); /*53,x35*/ + KEYCHAR_MAP.put((char) 0x36, KeyEvent.VK_6); /*54,x36*/ + KEYCHAR_MAP.put((char) 0x37, KeyEvent.VK_7); /*55,x37*/ + KEYCHAR_MAP.put((char) 0x38, KeyEvent.VK_8); /*56,x38*/ + KEYCHAR_MAP.put((char) 0x39, KeyEvent.VK_9); /*57,x39*/ + KEYCHAR_MAP.put((char) 0x3a, KeyEvent.VK_COLON); /*58,x3a*/ /*':', fr*/ + KEYCHAR_MAP.put((char) 0x3b, KeyEvent.VK_SEMICOLON); /*59,x3b*/ /*';'*/ + KEYCHAR_MAP.put((char) 0x3c, KeyEvent.VK_LESS); /*60,x3c*/ /*'<' us 102*/ + KEYCHAR_MAP.put((char) 0x3d, KeyEvent.VK_EQUALS); /*61,x3d*/ + KEYCHAR_MAP.put((char) 0x3e, KeyEvent.VK_GREATER); /*62,x3e*/ /*'>' ?????? where???*/ + // Javadoc says: "there is no keycode for the question mark because + // there is no keyboard for which it appears on the primary layer." + // Well, it's Lithuanian standard. + //keycharHash.put('?', (char)0x3f); /*63,x3f*/ /*no VK, cannot test*/ + KEYCHAR_MAP.put((char) 0x40, KeyEvent.VK_AT); /*64,x40*/ /*'@' ?????? where???*/ + KEYCHAR_MAP.put((char) 0x1, KeyEvent.VK_A); /*65,x41*/ + KEYCHAR_MAP.put((char) 0x2, KeyEvent.VK_B); /*66,x42*/ + KEYCHAR_MAP.put((char) 0x3, KeyEvent.VK_C); /*67,x43*/ + KEYCHAR_MAP.put((char) 0x4, KeyEvent.VK_D); /*68,x44*/ + KEYCHAR_MAP.put((char) 0x5, KeyEvent.VK_E); /*69,x45*/ + KEYCHAR_MAP.put((char) 0x6, KeyEvent.VK_F); /*70,x46*/ + KEYCHAR_MAP.put((char) 0x7, KeyEvent.VK_G); /*71,x47*/ + KEYCHAR_MAP.put((char) 0x8, KeyEvent.VK_H); /*72,x48*/ + KEYCHAR_MAP.put((char) 0x9, KeyEvent.VK_I); /*73,x49*/ + KEYCHAR_MAP.put((char) 0xa, KeyEvent.VK_J); /*74,x4a*/ + KEYCHAR_MAP.put((char) 0xb, KeyEvent.VK_K); /*75,x4b*/ + KEYCHAR_MAP.put((char) 0xc, KeyEvent.VK_L); /*76,x4c*/ + KEYCHAR_MAP.put((char) 0xd, KeyEvent.VK_M); /*77,x4d*/ + KEYCHAR_MAP.put((char) 0xe, KeyEvent.VK_N); /*78,x4e*/ + KEYCHAR_MAP.put((char) 0xf, KeyEvent.VK_O); /*79,x4f*/ + KEYCHAR_MAP.put((char) 0x10, KeyEvent.VK_P); /*80,x50*/ + KEYCHAR_MAP.put((char) 0x11, KeyEvent.VK_Q); /*81,x51*/ + KEYCHAR_MAP.put((char) 0x12, KeyEvent.VK_R); /*82,x52*/ + KEYCHAR_MAP.put((char) 0x13, KeyEvent.VK_S); /*83,x53*/ + KEYCHAR_MAP.put((char) 0x14, KeyEvent.VK_T); /*84,x54*/ + KEYCHAR_MAP.put((char) 0x15, KeyEvent.VK_U); /*85,x55*/ + KEYCHAR_MAP.put((char) 0x16, KeyEvent.VK_V); /*86,x56*/ + KEYCHAR_MAP.put((char) 0x17, KeyEvent.VK_W); /*87,x57*/ + KEYCHAR_MAP.put((char) 0x18, KeyEvent.VK_X); /*88,x58*/ + KEYCHAR_MAP.put((char) 0x19, KeyEvent.VK_Y); /*89,x59*/ + KEYCHAR_MAP.put((char) 0x1a, KeyEvent.VK_Z); /*90,x5a*/ + + KEYCHAR_MAP.put((char) 0x1b, KeyEvent.VK_OPEN_BRACKET); /*91,x5b*/ /*'['*/ + KEYCHAR_MAP.put((char) 0x1c, KeyEvent.VK_BACK_SLASH); /*92,x5c*/ /*'\'*/ + KEYCHAR_MAP.put((char) 0x1d, KeyEvent.VK_CLOSE_BRACKET); /*93,x5d*/ /*']'*/ + KEYCHAR_MAP.put((char) 0x5e, KeyEvent.VK_CIRCUMFLEX); /*94,x5e*/ /*'^' ?? nodead fr, de??*/ + KEYCHAR_MAP.put((char) 0x1f, KeyEvent.VK_UNDERSCORE); /*95,x5f*/ /*'_' fr*/ + KEYCHAR_MAP.put((char) 0x60, KeyEvent.VK_BACK_QUOTE); /*96,x60*/ + /********* Same as uppercase*/ + //keycharHash.put((char)0x1, KeyEvent.VK_a); /*97,x61*/ + //keycharHash.put((char)0x2, KeyEvent.VK_b); /*98,x62*/ + //keycharHash.put((char)0x3, KeyEvent.VK_c); /*99,x63*/ + //keycharHash.put((char)0x4, KeyEvent.VK_d); /*100,x64*/ + //keycharHash.put((char)0x5, KeyEvent.VK_e); /*101,x65*/ + //keycharHash.put((char)0x6, KeyEvent.VK_f); /*102,x66*/ + //keycharHash.put((char)0x7, KeyEvent.VK_g); /*103,x67*/ + //keycharHash.put((char)0x8, KeyEvent.VK_h); /*104,x68*/ + //keycharHash.put((char)0x9, KeyEvent.VK_i); /*105,x69*/ + //keycharHash.put((char)0xa, KeyEvent.VK_j); /*106,x6a*/ + //keycharHash.put((char)0xb, KeyEvent.VK_k); /*107,x6b*/ + //keycharHash.put((char)0xc, KeyEvent.VK_l); /*108,x6c*/ + //keycharHash.put((char)0xd, KeyEvent.VK_m); /*109,x6d*/ + //keycharHash.put((char)0xe, KeyEvent.VK_n); /*110,x6e*/ + //keycharHash.put((char)0xf, KeyEvent.VK_o); /*111,x6f*/ + //keycharHash.put((char)0x10, KeyEvent.VK_p); /*112,x70*/ + //keycharHash.put((char)0x11, KeyEvent.VK_q); /*113,x71*/ + //keycharHash.put((char)0x12, KeyEvent.VK_r); /*114,x72*/ + //keycharHash.put((char)0x13, KeyEvent.VK_s); /*115,x73*/ + //keycharHash.put((char)0x14, KeyEvent.VK_t); /*116,x74*/ + //keycharHash.put((char)0x15, KeyEvent.VK_u); /*117,x75*/ + //keycharHash.put((char)0x16, KeyEvent.VK_v); /*118,x76*/ + //keycharHash.put((char)0x17, KeyEvent.VK_w); /*119,x77*/ + //keycharHash.put((char)0x18, KeyEvent.VK_x); /*120,x78*/ + //keycharHash.put((char)0x19, KeyEvent.VK_y); /*121,x79*/ + //keycharHash.put((char)0x1a, KeyEvent.VK_z); /*122,x7a*/ + + KEYCHAR_MAP.put((char) 0x7b, KeyEvent.VK_BRACELEFT); /*123,x7b*/ /*'{' la (Latin American)*/ + //keycharHash.put(char) 0x1c, KeyEvent.VK_|); /*124,x7c*/ /* no VK, cannot test*/ + KEYCHAR_MAP.put((char) 0x7d, KeyEvent.VK_BRACERIGHT); /*125,x7d*/ /*'}' la */ + //keycharHash.put((char) 0x1e, KeyEvent.VK_~); /*126,x7e*/ /* no VK, cannot test*/ } - public static void main(String[] args) { + + public static void main(String[] args) throws AWTException { CtrlASCII test = new CtrlASCII(); test.init(); test.start(); } - public void init() - { - fillHash( false ); - this.setLayout (new BorderLayout ()); + public void init() throws AWTException { + fillHash(); - }//End init() + robot = new Robot(); + robot.setAutoWaitForIdle(true); + robot.setAutoDelay(100); + + setLayout(new BorderLayout()); - public void start () - { - setSize(400,300); + setSize(400, 300); setLocationRelativeTo(null); setVisible(true); @@ -181,87 +187,83 @@ tf.addKeyListener(this); validate(); - try { - robot = new Robot(); - robot.setAutoWaitForIdle(true); - robot.setAutoDelay(100); - - robot.waitForIdle(); - - // wait for focus, etc. (Hack.) - robot.delay(2000); - this.requestFocus(); - tf.requestFocusInWindow(); + robot.waitForIdle(); + robot.delay(1000); + + this.requestFocus(); + tf.requestFocusInWindow(); + robot.waitForIdle(); + }//End init() + + public void start() { + try { Point pt = getLocationOnScreen(); - robot.mouseMove( pt.x+100, pt.y+100 ); - robot.delay(2000); - robot.mousePress( InputEvent.BUTTON1_MASK ); - robot.mouseRelease( InputEvent.BUTTON1_MASK ); - Enumeration enuElem = keycharHash.elements(); - - int kc; - while( enuElem.hasMoreElements()) { - kc = enuElem.nextElement(); - punchCtrlKey( robot, kc ); - } + robot.mouseMove(pt.x + 100, pt.y + 100); + robot.delay(1000); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + KEYCHAR_MAP.forEach((k, v) -> punchCtrlKey(v)); + robot.delay(500); } catch (Exception e) { throw new RuntimeException("The test was not completed.\n\n" + e); + } finally { + dispose(); } - if( testFailed ) { + if (testFailed) { throw new RuntimeException("The test failed.\n\n"); } System.out.println("Success\n"); }// start() - public void punchCtrlKey( Robot ro, int keyCode ) { - ro.keyPress(KeyEvent.VK_CONTROL); + + public void punchCtrlKey(int keyCode) { try { - ro.keyPress(keyCode); - ro.keyRelease(keyCode); - }catch(IllegalArgumentException iae) { - System.err.println("skip probably invalid keyCode "+keyCode); + robot.keyPress(KeyEvent.VK_CONTROL); + robot.keyPress(keyCode); + } catch (IllegalArgumentException iae) { + System.err.println("skip probably invalid keyCode " + keyCode); + } finally { + try { + robot.keyRelease(keyCode); + } catch (IllegalArgumentException iae) { + System.err.println("skip probably invalid keyCode " + keyCode); + } + robot.keyRelease(KeyEvent.VK_CONTROL); } - ro.keyRelease(KeyEvent.VK_CONTROL); - ro.delay(200); + robot.delay(200); } - public void keyPressed(KeyEvent evt) - { + + public void keyPressed(KeyEvent evt) { //printKey(evt); } - public void keyTyped(KeyEvent evt) - { + public void keyTyped(KeyEvent evt) { printKey(evt); char keych = evt.getKeyChar(); - if( !keycharHash.containsKey( keych ) ) { - System.out.println("Unexpected keychar: "+keych); - System.out.println("Unexpected keychar: "+keych); + if (!KEYCHAR_MAP.containsKey(keych)) { + System.out.println("Unexpected keychar: " + keych); testFailed = true; } } - public void keyReleased(KeyEvent evt) - { + public void keyReleased(KeyEvent evt) { //printKey(evt); } - protected void printKey(KeyEvent evt) - { - switch(evt.getID()) - { - case KeyEvent.KEY_TYPED: - case KeyEvent.KEY_PRESSED: - case KeyEvent.KEY_RELEASED: - break; - default: - System.out.println("Other Event "); - System.out.println("Other Event "); - return; + protected void printKey(KeyEvent evt) { + switch (evt.getID()) { + case KeyEvent.KEY_TYPED: + case KeyEvent.KEY_PRESSED: + case KeyEvent.KEY_RELEASED: + break; + default: + System.out.println("Other Event "); + return; } - System.out.print(" 0x"+ Integer.toHexString(evt.getKeyChar())); - System.out.println (" 0x"+ Integer.toHexString(evt.getKeyChar())); + System.out.println(" 0x" + Integer.toHexString(evt.getKeyChar())); } }// class CtrlASCII diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, 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 @@ -35,8 +35,8 @@ import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicReference; import javax.swing.JButton; import javax.swing.JFrame; @@ -55,7 +55,7 @@ private static final int CHECK_LAPSE = 100; private static final int MAX_COUNT = MAX_TIME / INTERVAL; private static final int EXPECTED = MAX_COUNT * NUM_WINDOW; - private static final List WINDOWS = new ArrayList(); + private static final List WINDOWS = new CopyOnWriteArrayList<>(); public static void main(String[] args) { for (int i = 0; i < NUM_WINDOW; i++) { @@ -126,7 +126,7 @@ private static final class TestWindow extends JFrame implements ActionListener { private final JButton btn; - private int counter = 0; + private volatile int counter = 0; private final Timer t; TestWindow(final int num) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/event/StressTest/MouseAndKeyEventStressTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/event/StressTest/MouseAndKeyEventStressTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/event/StressTest/MouseAndKeyEventStressTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/event/StressTest/MouseAndKeyEventStressTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,556 @@ +/* + * Copyright (c) 2007, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Button; +import java.awt.Canvas; +import java.awt.Checkbox; +import java.awt.Choice; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.List; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.InputEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/* + * @test + * @key headful + * @bug 8302525 + * @summary Test performs various mouse and key operations to check events are getting triggered properly. + * @run main MouseAndKeyEventStressTest + */ +public class MouseAndKeyEventStressTest { + + private volatile static int mouseButtonTypes[] = + { InputEvent.BUTTON1_DOWN_MASK, InputEvent.BUTTON2_DOWN_MASK, + InputEvent.BUTTON3_DOWN_MASK }; + private volatile static String mouseButtonNames[] = + { "BUTTON1", "BUTTON2", "BUTTON3" }; + + private static Frame frame; + private volatile static Canvas canvas; + private volatile static Button button; + private volatile static List list; + private volatile static Choice choice; + private volatile static Checkbox checkbox; + private volatile static Component[] components; + + private volatile static boolean keyPressed; + private volatile static boolean keyReleased; + private volatile static boolean mousePressed; + private volatile static boolean mouseReleased; + private volatile static boolean actionPerformed; + private volatile static boolean itemEventPerformed; + + private volatile static Robot robot; + private volatile static Point compAt; + private volatile static Dimension compSize; + + private static void initializeGUI() { + frame = new Frame("Test Frame"); + frame.setLayout(new FlowLayout()); + canvas = new Canvas(); + canvas.setSize(50, 50); + canvas.setBackground(Color.red); + button = new Button("Button"); + list = new List(); + list.add("One"); + list.add("Two"); + list.add("Three"); + choice = new Choice(); + for (int i = 0; i < 8; i++) { + choice.add("Choice " + i); + } + choice.select(3); + checkbox = new Checkbox("Checkbox"); + + components = new Component[] { canvas, button, list, choice, checkbox }; + + button.addActionListener((actionEvent) -> { + actionPerformed = true; + System.out.println("button Got an actionEvent: " + actionEvent); + }); + checkbox.addItemListener((itemEvent) -> { + itemEventPerformed = true; + System.out.println("checkbox Got a ItemEvent: " + itemEvent); + }); + list.addItemListener((itemEvent) -> { + itemEventPerformed = true; + System.out.println("List Got a ItemEvent: " + itemEvent); + }); + choice.addItemListener((itemEvent) -> { + itemEventPerformed = true; + System.out.println("Choice Got a ItemEvent: " + itemEvent); + }); + for (int i = 0; i < components.length; i++) { + components[i].addKeyListener(new KeyAdapter() { + + public void keyPressed(KeyEvent ke) { + System.out.println("Got a keyPressedSource: " + ke); + keyPressed = true; + } + + public void keyReleased(KeyEvent ke) { + System.out.println("Got a keyReleasedSource: " + ke); + keyReleased = true; + } + }); + components[i].addMouseListener(new MouseAdapter() { + + public void mousePressed(MouseEvent me) { + mousePressed = true; + System.out.println("Got a mousePressSource: " + me); + } + + public void mouseReleased(MouseEvent me) { + mouseReleased = true; + System.out.println("Got a mouseReleaseSource: " + me); + } + + }); + frame.add(components[i]); + } + + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + try { + EventQueue.invokeAndWait(MouseAndKeyEventStressTest::initializeGUI); + doTest(); + } finally { + EventQueue.invokeAndWait(MouseAndKeyEventStressTest::disposeFrame); + } + } + + private static void doTest() throws Exception { + robot = new Robot(); + robot.setAutoDelay(100); + robot.waitForIdle(); + + canvasMouseKeyTest(); + buttonMouseKeyTest(); + listMouseKeyTest(); + choiceMouseKeyTest(); + checkboxMouseKeyTest(); + + System.out.println("Test passed!"); + } + + private static void canvasMouseKeyTest() throws Exception { + Component component = canvas; + robot.waitForIdle(); + + for (int i = 0; i < mouseButtonTypes.length; i++) { + resetValues(); + EventQueue.invokeAndWait(() -> { + compAt = component.getLocationOnScreen(); + compSize = component.getSize(); + }); + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: Moving focus. mousePressed event did not occur for " + + component.getClass()); + } + + resetValues(); + robot.keyPress(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyPressed) { + throw new RuntimeException( + "FAIL: keyPressed event " + "did not occur for " + + component.getClass() + " for key A"); + } + + resetValues(); + robot.mousePress(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: mousePressed event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.mouseRelease(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mouseReleased) { + throw new RuntimeException( + "FAIL: mouseReleased event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.keyRelease(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyReleased) { + throw new RuntimeException("FAIL: keyReleased event " + + "did not occur for " + component.getClass()); + } + + keyType(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + } + System.out.println("Test passed:" + component); + } + + private static void buttonMouseKeyTest() throws Exception { + Component component = button; + robot.waitForIdle(); + + for (int i = 0; i < mouseButtonTypes.length; i++) { + resetValues(); + EventQueue.invokeAndWait(() -> { + compAt = component.getLocationOnScreen(); + compSize = component.getSize(); + }); + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: Moving focus. mousePressed event did not occur for " + + component.getClass()); + } + + resetValues(); + robot.keyPress(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyPressed) { + throw new RuntimeException( + "FAIL: keyPressed event " + "did not occur for " + + component.getClass() + " for key A"); + } + + resetValues(); + robot.mousePress(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: mousePressed event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.mouseRelease(mouseButtonTypes[i]); + robot.waitForIdle(); + + if (!actionPerformed) { + throw new RuntimeException( + "FAIL: action event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + if (!mouseReleased) { + throw new RuntimeException( + "FAIL: mouseReleased event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.keyRelease(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyReleased) { + throw new RuntimeException("FAIL: keyReleased event " + + "did not occur for " + component.getClass()); + } + + keyType(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + } + System.out.println("Test passed:" + component); + } + + private static void listMouseKeyTest() throws Exception { + Component component = list; + robot.waitForIdle(); + + for (int i = 0; i < mouseButtonTypes.length; i++) { + resetValues(); + EventQueue.invokeAndWait(() -> { + compAt = component.getLocationOnScreen(); + compSize = component.getSize(); + }); + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: Moving focus. mousePressed event did not occur for " + + component.getClass()); + } + + resetValues(); + robot.keyPress(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyPressed) { + throw new RuntimeException( + "FAIL: keyPressed event " + "did not occur for " + + component.getClass() + " for key A"); + } + + resetValues(); + robot.mousePress(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: mousePressed event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.mouseRelease(mouseButtonTypes[i]); + robot.waitForIdle(); + + if (!itemEventPerformed) { + throw new RuntimeException("FAIL: Item event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + if (!mouseReleased) { + throw new RuntimeException( + "FAIL: mouseReleased event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.keyRelease(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyReleased) { + throw new RuntimeException("FAIL: keyReleased event " + + "did not occur for " + component.getClass()); + } + + keyType(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + } + System.out.println("Test passed:" + component); + } + + private static void choiceMouseKeyTest() throws Exception { + Component component = choice; + robot.waitForIdle(); + + for (int i = 0; i < mouseButtonTypes.length; i++) { + resetValues(); + EventQueue.invokeAndWait(() -> { + compAt = component.getLocationOnScreen(); + compSize = component.getSize(); + }); + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: Moving focus. mousePressed event did not occur for " + + component.getClass()); + } + + if (component instanceof Choice) { + keyType(KeyEvent.VK_ESCAPE); + } + + resetValues(); + robot.keyPress(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyPressed) { + throw new RuntimeException( + "FAIL: keyPressed event " + "did not occur for " + + component.getClass() + " for key A"); + } + + resetValues(); + robot.mousePress(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: mousePressed event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + boolean isMac = + System.getProperty("os.name").toLowerCase().contains("os x"); + if (isMac) { + // Choice's pop-up menu is drawn in front of choice. So + // choice can not get mouse events generated by robot, + // that's why test is made to dispath event. + MouseEvent me = + new MouseEvent(choice, MouseEvent.MOUSE_RELEASED, + System.currentTimeMillis(), mouseButtonTypes[i], + compSize.width, compSize.height, 1, false); + choice.dispatchEvent(me); + } else { + robot.mouseRelease(mouseButtonTypes[i]); + } + robot.waitForIdle(); + + if (!mouseReleased) { + throw new RuntimeException( + "FAIL: mouseReleased event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height + 30); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + + if (!itemEventPerformed) { + throw new RuntimeException("FAIL: Item event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.keyRelease(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyReleased) { + throw new RuntimeException("FAIL: keyReleased event " + + "did not occur for " + component.getClass()); + } + + keyType(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + } + System.out.println("Test passed:" + component); + } + + private static void checkboxMouseKeyTest() throws Exception { + Component component = checkbox; + robot.waitForIdle(); + for (int i = 0; i < mouseButtonTypes.length; i++) { + + resetValues(); + EventQueue.invokeAndWait(() -> { + compAt = component.getLocationOnScreen(); + compSize = component.getSize(); + }); + + robot.mouseMove(compAt.x + compSize.width / 2, + compAt.y + compSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: Moving focus. mousePressed event did not occur for " + + component.getClass()); + } + + resetValues(); + robot.keyPress(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyPressed) { + throw new RuntimeException( + "FAIL: keyPressed event " + "did not occur for " + + component.getClass() + " for key A"); + } + + resetValues(); + robot.mousePress(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mousePressed) { + throw new RuntimeException( + "FAIL: mousePressed event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.mouseRelease(mouseButtonTypes[i]); + robot.waitForIdle(); + if (!mouseReleased) { + throw new RuntimeException( + "FAIL: mouseReleased event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + if (!itemEventPerformed) { + throw new RuntimeException("FAIL: Item event did not occur for " + + component.getClass() + " for " + mouseButtonNames[i]); + } + + resetValues(); + robot.keyRelease(KeyEvent.VK_A); + robot.waitForIdle(); + if (!keyReleased) { + throw new RuntimeException("FAIL: keyReleased event " + + "did not occur for " + component.getClass()); + } + + keyType(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + } + System.out.println("Test passed:" + component); + } + + private static void resetValues() { + keyPressed = false; + keyReleased = false; + mousePressed = false; + mouseReleased = false; + } + + private static void keyType(int key) throws Exception { + robot.keyPress(key); + robot.keyRelease(key); + } + + public static void disposeFrame() { + if (frame != null) { + frame.dispose(); + } + } + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/font/FontScaling/StretchedFontTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/font/FontScaling/StretchedFontTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/font/FontScaling/StretchedFontTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/font/FontScaling/StretchedFontTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,6 +26,7 @@ import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.font.FontRenderContext; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.File; @@ -62,15 +63,19 @@ new Color(0x7F000000, true) }; + /** Locale for getting font names. */ + private static final Locale ENGLISH_LOCALE = Locale.ENGLISH; + private static final AffineTransform STRETCH_TRANSFORM = AffineTransform.getScaleInstance(2.0, 1.0); public static void main(String[] args) { List errors = Arrays.stream(getLocalGraphicsEnvironment() - .getAvailableFontFamilyNames(Locale.ENGLISH)) + .getAvailableFontFamilyNames(ENGLISH_LOCALE)) .map(family -> new Font(family, Font.PLAIN, FONT_SIZE)) .filter(font -> font.canDisplay(TEXT.codePointAt(0))) + .filter(font -> !isBrokenFont(font)) .map(font -> font.deriveFont(STRETCH_TRANSFORM)) .flatMap(StretchedFontTest::testFont) .filter(Objects::nonNull) @@ -84,6 +89,26 @@ } /** + * Checks whether the font renders the glyph in {@code TEXT} and + * returns {@code true} if the glyph isn't rendered. + * + * @param font the font to test + * @return {@code true} if the visual bounds of {@code TEXT} are empty, and + * {@code false} otherwise + */ + private static boolean isBrokenFont(final Font font) { + final boolean empty = + font.createGlyphVector(new FontRenderContext(null, false, false), + TEXT) + .getVisualBounds() + .isEmpty(); + if (empty) { + System.err.println("Broken font: " + font.getFontName(ENGLISH_LOCALE)); + } + return empty; + } + + /** * Tests the font with a set of text antialiasing hints. * * @param font the font to test @@ -146,7 +171,7 @@ if (verifyImage(image)) { return null; } - String fontName = font.getFontName(Locale.ENGLISH); + String fontName = font.getFontName(ENGLISH_LOCALE); String hintValue = getHintString(hint); String hexColor = String.format("0x%08x", foreground.getRGB()); saveImage(image, fontName + "-" + hintValue + "-" + hexColor); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2022, 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 @@ -21,105 +21,121 @@ * questions. */ -/** +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.awt.print.PageFormat; +import java.awt.print.Pageable; +import java.awt.print.Printable; +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.lang.reflect.InvocationTargetException; +import java.util.Objects; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; + +import static java.awt.EventQueue.invokeAndWait; + +/* * @test * @bug 6531728 + * @key printer + * @library ../../../regtesthelpers + * @build PassFailJFrame * @summary Test printing of images which need to have src area clipped - * @run main/manual=yesno/timeout=900 ClippedImages + * @run main/manual ClippedImages */ -import java.io.*; -import java.awt.*; -import java.awt.geom.*; -import java.awt.event.*; -import java.awt.print.*; -import java.awt.image.BufferedImage; -import javax.print.*; -import javax.print.attribute.*; +public class ClippedImages { -public class ClippedImages extends Frame implements ActionListener { + private static ClippedImageCanvas c; + private static Frame frame; - private ClippedImageCanvas c; + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { - public static void main(String args[]) { + if (PrinterJob.lookupPrintServices().length > 0) { + + String instruction = + "This is a manual test as it requires that you compare the\n" + + "on-screen rendering with the printed output.\n" + + "\n" + + "Select the 'Print All' button to print out the test. It will\n" + + "generate 4 sides of content: as it will print each of 2 sets\n" + + "of transformed images in portrait, and landscape orientations.\n" + + "\n" + + "The sets of images are in turn made up of two similar sets of\n" + + " pages: one is 'random' images, the other is 16 squares. Use the\n" + + "'Toggle Contents' button to view the screen rendering. For each\n" + + "page compare the printed content to the same on-screen one\n" + + "taking careful note of\n" + + "a) the positions of the red/blue circles on the corners\n" + + "b) that numerical text on the image is displayed similarly\n" + + "e) that the green quadrilaterals match on-screen\n" + + "f) that the rendering is clipped at the default (typically 1 inch)\n" + + "margins of the page.\n" + + "\n" + + "The test PASSES if the onscreen and printed rendering match" + ; + + PassFailJFrame passFailJFrame = new PassFailJFrame("Test " + + "Instruction", instruction, 15); + invokeAndWait(ClippedImages::createTestUI); + passFailJFrame.awaitAndCheck(); - ClippedImages f = new ClippedImages(); - f.setVisible(true); + } else { + System.out.println("Printer not configured or available." + + " Test cannot continue."); + PassFailJFrame.forcePass(); + } } - public ClippedImages() { - super("Clipped Src Area Image Printing Test"); + public static void createTestUI() { + frame = new Frame("Clipped Src Area Image Printing Test"); c = new ClippedImageCanvas(); - add("Center", c); + frame.add(c, BorderLayout.CENTER); Button paintButton = new Button("Toggle Contents"); - paintButton.addActionListener(this); + paintButton.addActionListener((ae) -> { + c.toggleContents(); + c.repaint(); + }); Button printThisButton = new Button("Print This"); - printThisButton.addActionListener(this); + printThisButton.addActionListener((ae) -> printOne()); Button printAllButton = new Button("Print All"); - printAllButton.addActionListener(this); + printAllButton.addActionListener((ae) -> printAll()); Panel p = new Panel(); p.add(paintButton); p.add(printThisButton); p.add(printAllButton); - add("South", p); - add("North", getInstructions()); - addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - - pack(); - } - - private TextArea getInstructions() { - TextArea ta = new TextArea(18, 60); - ta.setFont(new Font("Dialog", Font.PLAIN, 11)); - ta.setText - ("This is a manual test as it requires that you compare "+ - "the on-screen rendering with the printed output.\n"+ - "Select the 'Print All' button to print out the test\n"+ - "It will generate 4 sides of content: as it will print "+ - "each of 2 sets of transformed images in portrait, \n"+ - "and landscape orientations. \n"+ - "The sets of images are in turn made up\n"+ - "of two similar sets of pages: one is 'random' images,\n "+ - " the other is 16 squares.\n"+ - "Use the 'Toggle Contents' button to view the screen rendering\n"+ - "For each page compare the printed content to the same\n"+ - "on-screen one taking careful note of\n"+ - "a) the positions of the red/blue circles on the corners\n"+ - "b) that numerical text on the image is displayed similarly\n"+ - "e) that the green quadrilaterals match on-screen\n"+ - "f) that the rendering is clipped at the default (typically 1 inch) "+ - "margins of the page.\n"+ - "The test PASSES if the onscreen and printed rendering match"); - return ta; - } - - public void actionPerformed(ActionEvent e) { - - if (e.getActionCommand().equals("Print This")) { - printOne(); - } else if (e.getActionCommand().equals("Print All")) { - printAll(); - } else if (e.getActionCommand().equals("Toggle Contents")) { - c.toggleContents(); - c.repaint(); - } + frame.add(p, BorderLayout.SOUTH); + frame.setLocationRelativeTo(null); + frame.pack(); + + PassFailJFrame.addTestWindow(frame); + PassFailJFrame.positionTestWindow(frame, PassFailJFrame.Position.HORIZONTAL); + frame.setVisible(true); } - private void printOne() { + private static void printOne() { PrinterJob pj = PrinterJob.getPrinterJob(); - PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet(); - if (pj != null && (false||pj.printDialog(attrs))) { - c.setPrinterJob(pj, false); - pj.setPrintable(c); + c.setPrinterJob(pj, false); + pj.setPrintable(c); + if (pj.printDialog(attrs)) { try { pj.print(attrs); } catch (PrinterException pe) { @@ -128,15 +144,18 @@ } finally { System.out.println("PRINT RETURNED OK."); } + } else { + throw new RuntimeException("Test failed : " + + "User selected 'Cancel' button on the print dialog"); } } - private void printAll() { + private static void printAll() { PrinterJob pj = PrinterJob.getPrinterJob(); PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet(); - if (pj != null && (false||pj.printDialog(attrs))) { - c.setPrinterJob(pj, true); - pj.setPageable(c); + c.setPrinterJob(pj, true); + pj.setPageable(c); + if (pj.printDialog(attrs)) { try { pj.print(attrs); } catch (PrinterException pe) { @@ -145,6 +164,9 @@ } finally { System.out.println("PRINT RETURNED OK."); } + } else { + throw new RuntimeException("Test failed : " + + "User selected 'Cancel' button on the print dialog"); } } } @@ -167,7 +189,7 @@ for (int y=12;y= getNumberOfPages()) { - throw new IndexOutOfBoundsException(); - } + throws IndexOutOfBoundsException { + Objects.checkIndex(pageIndex, getNumberOfPages()); PageFormat pf = myPrinterJob.defaultPage(); switch (pageIndex % 2) { - - case 0 : - pf.setOrientation(PageFormat.PORTRAIT); - break; - - case 1: - pf.setOrientation(PageFormat.LANDSCAPE); - break; + case 0 : + pf.setOrientation(PageFormat.PORTRAIT); + break; + + case 1: + pf.setOrientation(PageFormat.LANDSCAPE); + break; } return pf; } @@ -224,11 +242,9 @@ } public Printable getPrintable(int pageIndex) - throws IndexOutOfBoundsException { + throws IndexOutOfBoundsException { + Objects.checkIndex(pageIndex, getNumberOfPages()); - if (pageIndex < 0 || pageIndex >= getNumberOfPages()) { - throw new IndexOutOfBoundsException(); - } if (pageIndex < 2) { paintSquares = true; } else { @@ -286,7 +302,7 @@ for (int p=0;p dA + dD - the normal untransformed case */ + /* sA + sD -> dA + dD - the normal untransformed case */ drawImage(g, dxa, dya, dxd, dyd, sxa, sya, sxd, syd); g.translate(incX, 0); @@ -388,7 +404,6 @@ drawImage(g, dxa, dya, dxd, dyd, sxc, syc, sxb, syb); g.translate(-3*incX, incY); - /******/ /* sA + sD -> dD + dA */ drawImage(g, dxd, dyd, dxa, dya, sxa, sya, sxd, syd); @@ -406,7 +421,6 @@ drawImage(g, dxd, dyd, dxa, dya, sxc, syc, sxb, syb); g.translate(-3*incX, incY); - /******/ /* sA + sD -> dB + dC */ drawImage(g, dxb, dyb, dxc, dyc, sxa, sya, sxd, syd); @@ -424,7 +438,6 @@ drawImage(g, dxb, dyb, dxc, dyc, sxc, syc, sxb, syb); g.translate(-3*incX, incY); - /******/ /* sA + sD -> dC + dB */ @@ -445,11 +458,11 @@ - /* Size is chosen to match default imageable width of a NA letter - * page. This means there will be clipping, what is clipped will - * depend on PageFormat orientation. - */ - public Dimension getPreferredSize() { + /* Size is chosen to match default imageable width of a NA letter + * page. This means there will be clipping, what is clipped will + * depend on PageFormat orientation. + */ + public Dimension getPreferredSize() { return new Dimension(468, 468); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java 2024-01-09 21:19:49.000000000 +0000 @@ -53,6 +53,7 @@ "The test passes if the text shows through the rectangular image.\n"; PassFailJFrame passFailJFrame = new PassFailJFrame(instruction, 10); + PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.HORIZONTAL); try { PrinterJob pj = PrinterJob.getPrinterJob(); pj.setPrintable(new PrintARGBImage()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2022, 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 @@ -21,56 +21,73 @@ * questions. */ -/** +import java.awt.Graphics; +import java.awt.print.PageFormat; +import java.awt.print.Printable; +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.print.attribute.standard.DialogTypeSelection; +import javax.print.attribute.standard.PageRanges; +import jtreg.SkippedException; + +/* * @test * @bug 8061267 + * @key printer + * @library /java/awt/regtesthelpers + * @library /test/lib + * @build PassFailJFrame + * @build jtreg.SkippedException * @summary The specified page range should be displayed in the dialog - * @run main/manual=yesno PageRangesDlgTest + * @run main/manual PageRangesDlgTest */ -import javax.print.*; -import javax.print.attribute.*; -import javax.print.attribute.standard.*; -import java.awt.*; -import java.awt.print.*; - public class PageRangesDlgTest implements Printable { - static String[] instr = { - "This test is to check that the print dialog displays the specified", - "page ranges. You must have a printer installed for this test.", - "It is valid only on dialogs which support page ranges", - "In each dialog, check that a page range of 2 to 3 is requested", - "Optionally press Print instead of Cancel, and verify that the", - "correct number/set of pages is printed", - }; - - public static void main(String args[]) throws Exception { - for (int i=0;i frameList = new ArrayList<>(); + /** + * Prefix for the user-provided failure reason. + */ + private static final String FAILURE_REASON = "Failure Reason:\n"; + + private static final List windowList = new ArrayList<>(); private static final Timer timer = new Timer(0, null); private static final CountDownLatch latch = new CountDownLatch(1); @@ -60,7 +70,7 @@ private static volatile String testFailedReason; private static JFrame frame; - public enum Position {HORIZONTAL, VERTICAL} + public enum Position {HORIZONTAL, VERTICAL, TOP_LEFT_CORNER} public PassFailJFrame(String instructions) throws InterruptedException, InvocationTargetException { @@ -130,8 +140,8 @@ long leftTime = tTimeout - (System.currentTimeMillis() - startTime); if ((leftTime < 0) || failed) { timer.stop(); - testFailedReason = "Failure Reason:\n" - + "Timeout User did not perform testing."; + testFailedReason = FAILURE_REASON + + "Timeout User did not perform testing."; timeout = true; latch.countDown(); } @@ -161,8 +171,8 @@ @Override public void windowClosing(WindowEvent e) { super.windowClosing(e); - testFailedReason = "Failure Reason:\n" - + "User closed the instruction Frame"; + testFailedReason = FAILURE_REASON + + "User closed the instruction Frame"; failed = true; latch.countDown(); } @@ -171,8 +181,7 @@ frame.add(buttonsPanel, BorderLayout.SOUTH); frame.pack(); frame.setLocationRelativeTo(null); - frame.setVisible(true); - frameList.add(frame); + windowList.add(frame); } private static String convertMillisToTimeStr(long millis) { @@ -201,7 +210,7 @@ throw new IllegalStateException("awaitAndCheck() should not be called on EDT"); } latch.await(); - invokeAndWait(PassFailJFrame::disposeFrames); + invokeAndWait(PassFailJFrame::disposeWindows); if (timeout) { throw new RuntimeException(testFailedReason); @@ -215,12 +224,12 @@ } /** - * Dispose all the frame(s) i,e both the test instruction frame as - * well as the frame that is added via addTestFrame(Frame frame) + * Dispose all the window(s) i,e both the test instruction frame and + * the window(s) that is added via addTestWindow(Window testWindow) */ - private static synchronized void disposeFrames() { - for (Frame f : frameList) { - f.dispose(); + private static synchronized void disposeWindows() { + for (Window win : windowList) { + win.dispose(); } } @@ -236,7 +245,7 @@ JButton okButton = new JButton("OK"); okButton.addActionListener((ae) -> { - testFailedReason = "Failure Reason:\n" + jTextArea.getText(); + testFailedReason = FAILURE_REASON + jTextArea.getText(); dialog.setVisible(false); }); @@ -257,42 +266,127 @@ } /** - * Position the instruction frame with testFrame ( testcase created - * frame) by the specified position - * Note: This method should be invoked from the method that creates - * testFrame - * - * @param testFrame test frame that the test is created - * @param position position can be either HORIZONTAL (both test - * instruction frame and test frame as arranged side by - * side or VERTICAL ( both test instruction frame and - * test frame as arranged up and down) + * Approximately positions the instruction frame relative to the test + * window as specified by the {@code position} parameter. If {@code testWindow} + * is {@code null}, only the instruction frame is positioned according to + * {@code position} parameter. + *

This method should be called before making the test window visible + * to avoid flickering.

+ * + * @param testWindow test window that the test created. + * May be {@code null}. + * + * @param position position must be one of: + *
    + *
  • {@code HORIZONTAL} - the test instruction frame is positioned + * such that its right edge aligns with screen's horizontal center + * and the test window (if not {@code null}) is placed to the right + * of the instruction frame.
  • + * + *
  • {@code VERTICAL} - the test instruction frame is positioned + * such that its bottom edge aligns with the screen's vertical center + * and the test window (if not {@code null}) is placed below the + * instruction frame.
  • + * + *
  • {@code TOP_LEFT_CORNER} - the test instruction frame is positioned + * such that its top left corner is at the top left corner of the screen + * and the test window (if not {@code null}) is placed to the right of + * the instruction frame.
  • + *
*/ - public static void positionTestFrame(Frame testFrame, Position position) { + public static void positionTestWindow(Window testWindow, Position position) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + + // Get the screen insets to position the frame by taking into + // account the location of taskbar/menubars on screen. + GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice().getDefaultConfiguration(); + Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc); + if (position.equals(Position.HORIZONTAL)) { int newX = ((screenSize.width / 2) - frame.getWidth()); - frame.setLocation(newX, frame.getY()); - - testFrame.setLocation((frame.getLocation().x + frame.getWidth() + 5), frame.getY()); + frame.setLocation((newX + screenInsets.left), + (frame.getY() + screenInsets.top)); + syncLocationToWindowManager(); + if (testWindow != null) { + testWindow.setLocation((frame.getX() + frame.getWidth() + 5), + frame.getY()); + } } else if (position.equals(Position.VERTICAL)) { int newY = ((screenSize.height / 2) - frame.getHeight()); - frame.setLocation(frame.getX(), newY); + frame.setLocation((frame.getX() + screenInsets.left), + (newY + screenInsets.top)); + syncLocationToWindowManager(); + if (testWindow != null) { + testWindow.setLocation(frame.getX(), + (frame.getY() + frame.getHeight() + 5)); + } + } else if (position.equals(Position.TOP_LEFT_CORNER)) { + frame.setLocation(screenInsets.left, screenInsets.top); + syncLocationToWindowManager(); + if (testWindow != null) { + testWindow.setLocation((frame.getX() + frame.getWidth() + 5), + frame.getY()); + } + } + // make instruction frame visible after updating + // frame & window positions + frame.setVisible(true); + } + + /** + * Ensures the frame location is updated by the window manager + * if it adjusts the frame location after {@code setLocation}. + * + * @see #positionTestWindow + */ + private static void syncLocationToWindowManager() { + Toolkit.getDefaultToolkit().sync(); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * Returns the current position and size of the test instruction frame. + * This method can be used in scenarios when custom positioning of + * multiple test windows w.r.t test instruction frame is necessary, + * at test-case level and the desired configuration is not available + * as a {@code Position} option. + * + * @return Rectangle bounds of test instruction frame + * @see #positionTestWindow + * + * @throws InterruptedException exception thrown when thread is + * interrupted + * @throws InvocationTargetException if an exception is thrown while + * obtaining frame bounds on EDT + */ + public static Rectangle getInstructionFrameBounds() + throws InterruptedException, InvocationTargetException { + final Rectangle[] bounds = {null}; - testFrame.setLocation(frame.getX(), - (frame.getLocation().y + frame.getHeight() + 5)); + if (isEventDispatchThread()) { + bounds[0] = frame != null ? frame.getBounds() : null; + } else { + invokeAndWait(() -> { + bounds[0] = frame != null ? frame.getBounds() : null; + }); } + return bounds[0]; } /** - * Add the testFrame to the frameList so that test instruction frame - * and testFrame and any other frame used in this test is disposed - * via disposeFrames() + * Add the testWindow to the windowList so that test instruction frame + * and testWindow and any other windows used in this test is disposed + * via disposeWindows(). * - * @param testFrame testFrame that needs to be disposed + * @param testWindow testWindow that needs to be disposed */ - public static synchronized void addTestFrame(Frame testFrame) { - frameList.add(testFrame); + public static synchronized void addTestWindow(Window testWindow) { + windowList.add(testWindow); } /** @@ -314,8 +408,17 @@ * Forcibly fail the test. */ public static void forceFail() { + forceFail("forceFail called"); + } + + /** + * Forcibly fail the test and provide a reason. + * + * @param reason the reason why the test is failed + */ + public static void forceFail(String reason) { failed = true; + testFailedReason = FAILURE_REASON + reason; latch.countDown(); } } - diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/ProcessBuilder/Basic.java openjdk-lts-11.0.22+7/test/jdk/java/lang/ProcessBuilder/Basic.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/ProcessBuilder/Basic.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/ProcessBuilder/Basic.java 2024-01-09 21:19:49.000000000 +0000 @@ -2188,6 +2188,19 @@ case 2: r = s.read(bytes); break; default: throw new Error(); } + if (r >= 0) { + // The child sent unexpected output; print it to diagnose + System.out.println("Unexpected child output:"); + if ((action & 0x2) == 0) { + System.out.write(r); // Single character + + } else { + System.out.write(bytes, 0, r); + } + for (int c = s.read(); c >= 0; c = s.read()) + System.out.write(c); + System.out.println("\nEND Child output."); + } equal(-1, r); } catch (IOException ioe) { if (!ioe.getMessage().equals("Stream closed")) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/ProcessHandle/InfoTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/ProcessHandle/InfoTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/ProcessHandle/InfoTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/ProcessHandle/InfoTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -39,12 +39,13 @@ import java.util.Random; import java.util.concurrent.TimeUnit; -import jdk.test.lib.Platform; -import jdk.test.lib.Utils; import org.testng.Assert; import org.testng.TestNG; import org.testng.annotations.Test; +import jdk.test.lib.Platform; +import jdk.test.lib.Utils; + /* * @test * @bug 8077350 8081566 8081567 8098852 8136597 @@ -81,7 +82,6 @@ } // Main can be used to run the tests from the command line with only testng.jar. - @SuppressWarnings("raw_types") public static void main(String[] args) { Class[] testclass = {InfoTest.class}; TestNG testng = new TestNG(); @@ -160,11 +160,7 @@ ProcessHandle.Info info = p1.info(); System.out.printf(" info: %s%n", info); - if (info.user().isPresent()) { - String user = info.user().get(); - Assert.assertNotNull(user, "User name"); - Assert.assertEquals(user, whoami, "User name"); - } + assertUser(info); Optional command = info.command(); if (command.isPresent()) { @@ -291,11 +287,8 @@ ProcessHandle.Info info = p.info(); System.out.printf(" info: %s%n", info); - if (info.user().isPresent()) { - String user = info.user().get(); - Assert.assertNotNull(user); - Assert.assertEquals(user, whoami); - } + assertUser(info); + if (info.command().isPresent()) { String command = info.command().get(); String expected = "sleep"; @@ -397,7 +390,7 @@ Instant end = Instant.now().plusMillis(500L); while (end.isBefore(Instant.now())) { // burn the cpu time checking the time - long x = r.nextLong(); + r.nextLong(); } if (self.info().totalCpuDuration().isPresent()) { Duration totalCpu = self.info().totalCpuDuration().get(); @@ -410,6 +403,7 @@ } } } + /** * Check two Durations, the second should be greater than the first or * within the supplied Epsilon. @@ -443,4 +437,31 @@ pb.command(list); return pb.start(); } + + /** + * Asserts the expected process user. + * + * The Expected user is determined by creating a file and reading its owner, see static block above. + * + * On Windows, when run privileged as member of the Administrators group, this does not always + * work because new files can be owned by BUILTIN\Administrators instead, depending on system + * settings. In that case we resort to comparing System property user.name, which does not contain + * the domain name, though. + * + * @param info ProcessHanlde info object + */ + static void assertUser(ProcessHandle.Info info) { + if (!info.user().isPresent()) { + return; + } + String user = info.user().get(); + Assert.assertNotNull(user, "User name"); + if (Platform.isWindows() && "BUILTIN\\Administrators".equals(whoami)) { + int bsi = user.lastIndexOf("\\"); + Assert.assertEquals(bsi == -1 ? user : user.substring(bsi + 1), + System.getProperty("user.name"), "User name"); + } else { + Assert.assertEquals(user, whoami, "User name"); + } + } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/RuntimeTests/exec/SetCwd.java openjdk-lts-11.0.22+7/test/jdk/java/lang/RuntimeTests/exec/SetCwd.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/RuntimeTests/exec/SetCwd.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/RuntimeTests/exec/SetCwd.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1999, 2021, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4156278 + * @summary Basic functional test for + * Runtime.exec(String[] command, String[] env, File path) and + * Runtime.exec(String command, String[] env, File path). + * + * @library /test/lib + * @run testng/othervm SetCwd + */ +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import java.io.*; + +import static jdk.test.lib.Asserts.assertTrue; + +public class SetCwd { + + private static final String TEST_CLASSES = System.getProperty( + "test.classes", "."); + + private static final String[] CMD_ARRAY = new String[2]; + + @BeforeTest + public static void setUp() throws Exception { + CMD_ARRAY[0] = System.getProperty("java.home") + File.separator + + "bin" + File.separator + "java"; + CMD_ARRAY[1] = SimpleProcess.class.getName(); + } + + @Test + public void testRuntimeExecWithArray() throws Exception { + Process process = Runtime.getRuntime().exec(CMD_ARRAY, null, + new File(TEST_CLASSES)); + verifyProcessOutput(process); + } + + @Test + public void testRuntimeExecWithString() throws Exception { + String cmd = String.join(" ", CMD_ARRAY); + Process process = Runtime.getRuntime().exec(cmd, null, + new File(TEST_CLASSES)); + verifyProcessOutput(process); + } + + // Verify the process has executed by comparing its output with the expected + private void verifyProcessOutput(Process process) throws Exception { + process.waitFor(); + assertTrue(process.exitValue() == 0); + + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(process.getInputStream()))) { + String line = reader.readLine(); + if (!line.startsWith(TEST_CLASSES)) { + String error = String.format("Expected process output first line: " + + "'%s' Actual: '%s'", TEST_CLASSES, line); + throw new Exception(error); + } + } + } + + // This class main will be the entry point for test subprocesses + static class SimpleProcess { + public static void main (String[] args) throws Exception { + File dir = new File("."); + System.out.println(dir.getCanonicalPath()); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.java openjdk-lts-11.0.22+7/test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2009, 2021, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6829503 + * @summary 1) Test Console and DeleteOnExitHook can be initialized + * while shutdown is in progress + * 2) Test if files that are added by the application shutdown + * hook are deleted on exit during shutdown + * @library /test/lib + * @run testng/othervm ShutdownHooks + */ + +import jdk.test.lib.process.ProcessTools; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import java.io.*; +import java.nio.file.Files; + +import static jdk.test.lib.Asserts.assertFalse; + +public class ShutdownHooks { + + private static final String TEST_FILE_NAME = "fileToBeDeleted"; + + private static final File TEST_FILE = new File(TEST_FILE_NAME); + + private static final String TEST_CLASSES = System.getProperty( + "test.classes", "."); + + @BeforeTest + public static void setUp() throws Exception { + // Make sure file does not exist before test + Files.deleteIfExists(TEST_FILE.toPath()); + } + + @Test + public void testShutdownHooks() throws Exception { + // Run in a new process in order to evaluate shutdown hook results + String[] testCommand = new String[] {"-classpath", TEST_CLASSES, + ShutdownHooksProcess.class.getName()}; + ProcessTools.executeTestJvm(testCommand).shouldHaveExitValue(0); + + String errorMsg = "File exists despite shutdown hook has been run"; + assertFalse(Files.exists(TEST_FILE.toPath()), errorMsg); + } + + // This class main will be the entry point for test subprocesses + static class ShutdownHooksProcess { + public static void main(String[] args) throws Exception { + Runtime.getRuntime().addShutdownHook(new Cleaner()); + + System.out.println("Writing to "+ TEST_FILE); + try (PrintWriter pw = new PrintWriter(TEST_FILE)) { + pw.println("Shutdown begins"); + } + } + + static class Cleaner extends Thread { + public void run() { + // register the Console's shutdown hook while the application + // shutdown hook is running + Console cons = System.console(); + // register the DeleteOnExitHook while the application + // shutdown hook is running + TEST_FILE.deleteOnExit(); + try (PrintWriter pw = new PrintWriter(TEST_FILE)) { + pw.println("File is being deleted"); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + } + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/META-INF/services/java.lang.System$LoggerFinder openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/META-INF/services/java.lang.System$LoggerFinder --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/META-INF/services/java.lang.System$LoggerFinder 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/META-INF/services/java.lang.System$LoggerFinder 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1 @@ +loggerfinder.SimpleLoggerFinder diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/PlatformRecursiveLoadingTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/PlatformRecursiveLoadingTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/PlatformRecursiveLoadingTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/PlatformRecursiveLoadingTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8314263 + * @summary Creating a logger while loading the Logger finder + * triggers recursion and StackOverflowError + * @modules java.base/sun.util.logging java.base/jdk.internal.logger:+open + * @library ../lib + * @compile RecursiveLoadingTest.java SimpleLoggerFinder.java + * @run main/othervm PlatformRecursiveLoadingTest + */ + +import java.time.Instant; +import java.util.Arrays; +import java.util.List; +import java.util.logging.LogRecord; + +import sun.util.logging.PlatformLogger; + +public class PlatformRecursiveLoadingTest { + + /** + * This test triggers recursion by calling `System.getLogger` in the class init and constructor + * of a custom LoggerFinder. Without the fix, this is expected to throw + * java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.logger.LoggerFinderLoader$ErrorPolicy + * caused by: java.lang.StackOverflowError + */ + public static void main(String[] args) throws Throwable { + PlatformLogger.getLogger("main").info("in main"); + // allow time to let bootstrap logger flush data + BootstrapLoggerUtils.awaitPending(); + List logs = loggerfinder.SimpleLoggerFinder.LOGS; + logs.stream().map(SimpleLogRecord::of).forEach(System.out::println); + logs.stream().map(SimpleLogRecord::of).forEach(SimpleLogRecord::check); + assertEquals(String.valueOf(logs.size()), String.valueOf(3)); + } + + static List asList(Object[] params) { + return params == null ? null : Arrays.asList(params); + } + + public static class SimpleLogRecord { + + String message; + Instant instant; + String loggerName; + java.util.logging.Level level; + List params; + String resourceBundleName; + long seqNumber; + String sourceClassName; + String methodName; + Throwable thrown; + + public SimpleLogRecord(String message, Instant instant, String loggerName, java.util.logging.Level level, List params, + String resourceBundleName, long seqNumber, String sourceClassName, String methodName, Throwable thrown) { + this.message = message; + this.instant = instant; + this.loggerName = loggerName; + this.level = level; + this.params = params; + this.resourceBundleName = resourceBundleName; + this.seqNumber = seqNumber; + this.sourceClassName = sourceClassName; + this.methodName = methodName; + this.thrown = thrown; + } + + public SimpleLogRecord(LogRecord record) { + this(record.getMessage(), record.getInstant(), record.getLoggerName(), record.getLevel(), + asList(record.getParameters()), record.getResourceBundleName(), record.getSequenceNumber(), + record.getSourceClassName(), record.getSourceMethodName(), record.getThrown()); + } + static SimpleLogRecord of(Object o) { + if (o instanceof LogRecord) { + LogRecord record = (LogRecord) o; + return new SimpleLogRecord(record); + }else { + return null; + } + } + static SimpleLogRecord check(SimpleLogRecord record) { + if (record.loggerName.equals("dummy")) { + assertEquals(record.sourceClassName, "jdk.internal.logger.BootstrapLogger$LogEvent"); + assertEquals(record.methodName, "log"); + } + if (record.loggerName.equals("main")) { + assertEquals(record.sourceClassName, PlatformRecursiveLoadingTest.class.getName()); + assertEquals(record.methodName, "main"); + } + return record; + } + } + + private static void assertEquals(String received, String expected) { + if (!expected.equals(received)) { + throw new RuntimeException("Received: " + received); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/RecursiveLoadingTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/RecursiveLoadingTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/RecursiveLoadingTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/RecursiveLoadingTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8314263 + * @summary Creating a logger while loading the Logger finder + * triggers recursion and StackOverflowError + * @modules java.base/jdk.internal.logger:+open + * @library ../lib + * @compile RecursiveLoadingTest.java SimpleLoggerFinder.java + * @run main/othervm RecursiveLoadingTest + */ + +import java.time.Instant; +import java.util.Arrays; +import java.util.List; +import java.util.logging.LogRecord; + +public class RecursiveLoadingTest { + + /** + * This test triggers recursion by calling `System.getLogger` in the class init and constructor + * of a custom LoggerFinder. Without the fix, this is expected to throw + * java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.logger.LoggerFinderLoader$ErrorPolicy + * caused by: java.lang.StackOverflowError + */ + public static void main(String[] args) throws Throwable { + System.getLogger("main").log(System.Logger.Level.INFO, "in main"); + // allow time to let bootstrap logger flush data + BootstrapLoggerUtils.awaitPending(); + List logs = loggerfinder.SimpleLoggerFinder.LOGS; + logs.stream().map(SimpleLogRecord::of).forEach(System.out::println); + logs.stream().map(SimpleLogRecord::of).forEach(SimpleLogRecord::check); + assertEquals(String.valueOf(logs.size()), String.valueOf(3)); + } + + static List asList(Object[] params) { + return params == null ? null : Arrays.asList(params); + } + + public static class SimpleLogRecord { + + String message; + Instant instant; + String loggerName; + java.util.logging.Level level; + List params; + String resourceBundleName; + long seqNumber; + String sourceClassName; + String methodName; + Throwable thrown; + + public SimpleLogRecord(String message, Instant instant, String loggerName, java.util.logging.Level level, List params, + String resourceBundleName, long seqNumber, String sourceClassName, String methodName, Throwable thrown) { + this.message = message; + this.instant = instant; + this.loggerName = loggerName; + this.level = level; + this.params = params; + this.resourceBundleName = resourceBundleName; + this.seqNumber = seqNumber; + this.sourceClassName = sourceClassName; + this.methodName = methodName; + this.thrown = thrown; + } + + public SimpleLogRecord(LogRecord record) { + this(record.getMessage(), record.getInstant(), record.getLoggerName(), record.getLevel(), + asList(record.getParameters()), record.getResourceBundleName(), record.getSequenceNumber(), + record.getSourceClassName(), record.getSourceMethodName(), record.getThrown()); + } + public static SimpleLogRecord of(Object o) { + if (o instanceof LogRecord) { + LogRecord record = (LogRecord) o; + return new SimpleLogRecord(record); + }else { + return null; + } + } + public static SimpleLogRecord check(SimpleLogRecord record) { + if (record.loggerName.equals("dummy")) { + assertEquals(record.sourceClassName, "jdk.internal.logger.BootstrapLogger$LogEvent"); + assertEquals(record.methodName, "log"); + } + if (record.loggerName.equals("main")) { + assertEquals(record.sourceClassName, RecursiveLoadingTest.class.getName()); + assertEquals(record.methodName, "main"); + } + return record; + } + } + + private static void assertEquals(String received, String expected) { + if (!expected.equals(received)) { + throw new RuntimeException("Received: " + received); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/SimpleLoggerFinder.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/SimpleLoggerFinder.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/SimpleLoggerFinder.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/SimpleLoggerFinder.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package loggerfinder; + +import java.lang.*; +import java.util.*; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Handler; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +public class SimpleLoggerFinder extends System.LoggerFinder { + + public static final CopyOnWriteArrayList LOGS = new CopyOnWriteArrayList<>(); + static { + try { + int sleep = new Random().nextInt(1000) + 1; + // simulate a slow load service + Thread.sleep(sleep); + System.getLogger("dummy") + .log(System.Logger.Level.INFO, + "Logger finder service load sleep value: " + sleep); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + + private final Map loggers = new ConcurrentHashMap<>(); + public SimpleLoggerFinder() { + System.getLogger("dummy") + .log(System.Logger.Level.INFO, + "Logger finder service created"); + } + + @Override + public System.Logger getLogger(String name, Module module) { + return loggers.computeIfAbsent(name, SimpleLogger::new); + } + + private static class SimpleLogger implements System.Logger { + private final java.util.logging.Logger logger; + + private static final class SimpleHandler extends Handler { + @Override + public void publish(LogRecord record) { + LOGS.add(record); + } + @Override public void flush() { } + @Override public void close() { } + } + + public SimpleLogger(String name) { + logger = Logger.getLogger(name); + logger.addHandler(new SimpleHandler()); + } + + @Override + public String getName() { + return logger.getName(); + } + + java.util.logging.Level level(Level level) { + switch (level) { + case ALL: + return java.util.logging.Level.ALL; + case DEBUG: + return java.util.logging.Level.FINE; + case TRACE: + return java.util.logging.Level.FINER; + case INFO: + return java.util.logging.Level.INFO; + case WARNING: + return java.util.logging.Level.WARNING; + case ERROR: + return java.util.logging.Level.SEVERE; + case OFF: + return java.util.logging.Level.OFF; + }; + return null; + } + + @Override + public boolean isLoggable(Level level) { + return logger.isLoggable(level(level)); + } + + @Override + public void log(Level level, ResourceBundle bundle, String msg, Throwable thrown) { + var julLevel = level(level); + if (!logger.isLoggable(julLevel)) return; + if (bundle != null) { + logger.logrb(julLevel, bundle, msg, thrown); + } else { + logger.log(julLevel, msg, thrown); + } + } + + @Override + public void log(Level level, ResourceBundle bundle, String format, Object... params) { + var julLevel = level(level); + if (!logger.isLoggable(julLevel)) return; + if (params == null) { + if (bundle == null) { + logger.log(julLevel, format); + } else { + logger.logrb(julLevel, bundle, format); + } + } else { + if (bundle == null) { + logger.log(julLevel, format, params); + } else { + logger.logrb(julLevel, bundle, format, params); + } + } + } + } +} + diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/META-INF/services/java.lang.System$LoggerFinder openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/META-INF/services/java.lang.System$LoggerFinder --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/META-INF/services/java.lang.System$LoggerFinder 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/META-INF/services/java.lang.System$LoggerFinder 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1 @@ +loggerfinder.SimpleLoggerFinder diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SignedLoggerFinderTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SignedLoggerFinderTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SignedLoggerFinderTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SignedLoggerFinderTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,307 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8314263 + * @summary Signed jars triggering Logger finder recursion and StackOverflowError + * @library /test/lib ../lib + * @compile/module=java.base share/classes/jdk/internal/event/EventHelper.java + * @modules java.base/jdk.internal.logger:+open + * @build jdk.test.lib.compiler.CompilerUtils + * jdk.test.lib.process.* + * jdk.test.lib.util.JarUtils + * jdk.test.lib.JDKToolLauncher + * @compile SignedLoggerFinderTest.java SimpleLoggerFinder.java + * @run main SignedLoggerFinderTest init + * @run main SignedLoggerFinderTest init sign + */ + +import java.io.File; +import java.nio.file.*; +import java.security.*; +import java.util.*; +import java.util.function.*; +import java.util.jar.*; + +import jdk.test.lib.JDKToolFinder; +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.Utils; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.util.JarUtils; + +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; +import static java.util.Arrays.asList; + +public class SignedLoggerFinderTest { + + /** + * This test triggers recursion in the broken JDK. The error can + * manifest in a few different ways. + * One error seen is "java.lang.NoClassDefFoundError: + * Could not initialize class jdk.internal.logger.LoggerFinderLoader$ErrorPolicy" + * + * The original reported error was a StackOverflow (also seen in different iterations + * of this run). Running test in signed and unsigned jar mode for sanity coverage. + * The current bug only manifests when jars are signed. + */ + + private static boolean init = false; + private static boolean signJars = false; + private static boolean mutliThreadLoad = false; + private static volatile boolean testComplete = false; + + private static final String KEYSTORE = "8314263.keystore"; + private static final String ALIAS = "JavaTest"; + private static final String STOREPASS = "changeit"; + private static final String KEYPASS = "changeit"; + private static final String DNAME = "CN=sample"; + private static final String CUSTOM_LOGGER_FINDER_NAME = + "loggerfinder.SimpleLoggerFinder"; + private static final String CUSTOM_LOGGER_NAME = + "loggerfinder.SimpleLoggerFinder$SimpleLogger"; + private static final String INTERNAL_LOGGER_FINDER_NAME = + "sun.util.logging.internal.LoggingProviderImpl"; + private static final String INTERNAL_LOGGER_NAME = + "sun.util.logging.internal.LoggingProviderImpl$JULWrapper"; + private static final Path jarPath1 = + Path.of(System.getProperty("test.classes", "."), "SimpleLoggerFinder.jar"); + private static final Path jarPath2 = + Path.of(System.getProperty("test.classes", "."), "SimpleLoggerFinder2.jar"); + + public static void main(String[] args) throws Throwable { + init = args.length >=1 && args[0].equals("init"); + signJars = args.length >=2 && args[1].equals("sign"); + + // init only passed in by jtreg test run, initialize the environment + // for the subsequent test run + if (init) { + initialize(); + launchTest(false, false); + launchTest(false, true); + launchTest(true, false); + launchTest(true, true); + + } else { + // set up complete. Run the code to trigger the recursion + // We're in the JVM launched by ProcessTools.executeCommand + boolean multiThreadLoad = Boolean.getBoolean("multiThreadLoad"); + boolean withCustomLoggerFinder = Boolean.getBoolean("withCustomLoggerFinder"); + + if (multiThreadLoad) { + int sleep = new Random().nextInt(1000) + 1; + System.out.println("multi thread load sleep value: " + sleep); + new Thread(runnableWithSleep( + () -> System.getLogger("logger" + System.currentTimeMillis()), + sleep, "System.getLogger type: ")).start(); + new Thread(runnableWithSleep( + () -> System.LoggerFinder.getLoggerFinder(), + sleep, "System.getLoggerFinder type: ")).start(); + } + + if (withCustomLoggerFinder) { + JarFile jf = new JarFile(jarPath1.toString(), true); + jf.getInputStream(jf.getJarEntry("loggerfinder/SimpleLoggerFinder.class")); + JarFile jf2 = new JarFile(jarPath2.toString(), true); + jf2.getInputStream(jf.getJarEntry("loggerfinder/SimpleLoggerFinder.class")); + } else { + // some other call to prod LoggerFinder loading + System.getLogger("random" + System.currentTimeMillis()); + System.LoggerFinder.getLoggerFinder(); + } + Security.setProperty("test_1", "test"); + + // some extra sanity checks + if (withCustomLoggerFinder) { + assertEquals(System.LoggerFinder.getLoggerFinder().getClass().getName(), + CUSTOM_LOGGER_FINDER_NAME); + System.Logger testLogger = System.getLogger("jdk.event.security"); + assertEquals(testLogger.getClass().getName(), CUSTOM_LOGGER_NAME); + } else { + assertEquals(System.LoggerFinder.getLoggerFinder().getClass().getName(), + INTERNAL_LOGGER_FINDER_NAME); + System.Logger testLogger = System.getLogger("jdk.event.security"); + assertEquals(testLogger.getClass().getName(), INTERNAL_LOGGER_NAME); + } + testComplete = true; + + // LoggerFinder should be initialized, trigger a simple log call + Security.setProperty("test_2", "test"); + // allow time to let bootstrap logger flush data + BootstrapLoggerUtils.awaitPending(); + } + } + + // helper to create the inner test. Run config variations with the LoggerFinder jars + // on the classpath and with other threads running System.Logger calls during load + private static void launchTest(boolean multiThreadLoad, boolean withCustomLoggerFinder) { + List cmds = new ArrayList<>(); + cmds.add(JDKToolFinder.getJDKTool("java")); + cmds.addAll(asList(Utils.getTestJavaOpts())); + if (withCustomLoggerFinder) { + cmds.addAll(List.of("-classpath", + System.getProperty("test.classes") + File.pathSeparator + + jarPath1.toString() + File.pathSeparator + jarPath2.toString(), + "-Dtest.classes=" + System.getProperty("test.classes"))); + } else { + cmds.addAll(List.of("-classpath", + System.getProperty("test.classes"))); + } + + Path patches = Paths.get(System.getProperty("test.classes"), "patches", "java.base"); + cmds.addAll(List.of( + // patch of EventHelper to log at INFO level (for bootstrap logger) + "--patch-module", "java.base=" + patches.toString(), + // allow test to access internal bootstrap logger functionality + "--add-opens=java.base/jdk.internal.logger=ALL-UNNAMED", + // following debug property seems useful to tickle the issue + "-Dsun.misc.URLClassPath.debug=true", + // console logger level to capture event output + "-Djdk.system.logger.level=DEBUG", + // useful for debug purposes + "-Djdk.logger.finder.error=DEBUG", + // enable logging to verify correct output + "-Djava.util.logging.config.file=" + + Path.of(System.getProperty("test.src", "."), "logging.properties"))); + if (multiThreadLoad) { + cmds.add("-DmultiThreadLoad=true"); + } + if (withCustomLoggerFinder) { + cmds.add("-DwithCustomLoggerFinder=true"); + } + cmds.addAll(List.of( + "SignedLoggerFinderTest", + "no-init")); + + try { + OutputAnalyzer outputAnalyzer = ProcessTools.executeCommand(cmds.stream() + .filter(t -> !t.isEmpty()) + .toArray(String[]::new)) + .shouldHaveExitValue(0); + if (withCustomLoggerFinder) { + outputAnalyzer + .shouldContain("TEST LOGGER: [test_1, test]") + .shouldContain("TEST LOGGER: [test_2, test]"); + } else { + outputAnalyzer + .shouldContain("SecurityPropertyModification: key:test_1") + .shouldContain("SecurityPropertyModification: key:test_2"); + } + if (withCustomLoggerFinder && signJars) { + // X509 cert generated during verification of signed jar file + outputAnalyzer + .shouldContain(DNAME); + } + + } catch (Throwable t) { + throw new RuntimeException("Unexpected fail.", t); + } + } + + private static Runnable runnableWithSleep(Supplier s, long sleep, String desc) { + return () -> { + while(!testComplete) { + System.out.println(desc + s.get().getClass().getName()); + try { + Thread.sleep(sleep); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + }; + } + + private static void initialize() throws Throwable { + if (signJars) { + genKey(); + } + + Path classes = Paths.get(System.getProperty("test.classes", "")); + JarUtils.createJarFile(jarPath1, + classes, + classes.resolve("loggerfinder/SimpleLoggerFinder.class"), + classes.resolve("loggerfinder/SimpleLoggerFinder$SimpleLogger.class")); + + JarUtils.updateJarFile(jarPath1, Path.of(System.getProperty("test.src")), + Path.of("META-INF", "services", "java.lang.System$LoggerFinder")); + if (signJars) { + signJar(jarPath1.toString()); + } + // multiple signed jars with services to have ServiceLoader iteration + Files.copy(jarPath1, jarPath2, REPLACE_EXISTING); + } + + private static void genKey() throws Throwable { + String keytool = JDKToolFinder.getJDKTool("keytool"); + Files.deleteIfExists(Paths.get(KEYSTORE)); + ProcessTools.executeCommand(keytool, + "-J-Duser.language=en", + "-J-Duser.country=US", + "-genkey", + "-keyalg", "rsa", + "-alias", ALIAS, + "-keystore", KEYSTORE, + "-keypass", KEYPASS, + "-dname", DNAME, + "-storepass", STOREPASS + ).shouldHaveExitValue(0); + } + + + private static OutputAnalyzer signJar(String jarName) throws Throwable { + List args = new ArrayList<>(); + args.add("-verbose"); + args.add(jarName); + args.add(ALIAS); + + return jarsigner(args); + } + + private static OutputAnalyzer jarsigner(List extra) + throws Throwable { + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jarsigner") + .addVMArg("-Duser.language=en") + .addVMArg("-Duser.country=US") + .addToolArg("-keystore") + .addToolArg(KEYSTORE) + .addToolArg("-storepass") + .addToolArg(STOREPASS) + .addToolArg("-keypass") + .addToolArg(KEYPASS); + for (String s : extra) { + if (s.startsWith("-J")) { + launcher.addVMArg(s.substring(2)); + } else { + launcher.addToolArg(s); + } + } + return ProcessTools.executeCommand(launcher.getCommand()); + } + + private static void assertEquals(String received, String expected) { + if (!expected.equals(received)) { + throw new RuntimeException("Received: " + received); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SimpleLoggerFinder.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SimpleLoggerFinder.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SimpleLoggerFinder.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SimpleLoggerFinder.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package loggerfinder; + +import java.lang.*; +import java.util.*; + +public class SimpleLoggerFinder extends System.LoggerFinder { + + static { + try { + int sleep = new Random().nextInt(1000) + 1; + System.out.println("Logger finder service load sleep value: " + sleep); + // simulate a slow load service + Thread.sleep(sleep); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + @Override + public System.Logger getLogger(String name, Module module) { + return new SimpleLogger(name); + } + + private static class SimpleLogger implements System.Logger { + private final String name; + + public SimpleLogger(String name) { + this.name = name; + } + + @Override + public String getName() { + return name; + } + + @Override + public boolean isLoggable(Level level) { + return true; + } + + @Override + public void log(Level level, ResourceBundle bundle, String msg, Throwable thrown) { + System.out.println("TEST LOGGER: " + msg); + } + + @Override + public void log(Level level, ResourceBundle bundle, String format, Object... params) { + System.out.println("TEST LOGGER: " + Arrays.asList(params)); + + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/java.base/share/classes/jdk/internal/event/EventHelper.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/java.base/share/classes/jdk/internal/event/EventHelper.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/java.base/share/classes/jdk/internal/event/EventHelper.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/java.base/share/classes/jdk/internal/event/EventHelper.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.event; + +import jdk.internal.misc.JavaUtilJarAccess; +import jdk.internal.misc.SharedSecrets; + +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; +import java.time.Duration; +import java.time.Instant; +import java.util.Date; +import java.util.stream.Collectors; +import java.util.stream.LongStream; + +/** + * A helper class to have events logged to a JDK Event Logger. + */ + +public final class EventHelper { + + private static final JavaUtilJarAccess JUJA = SharedSecrets.javaUtilJarAccess(); + private static volatile boolean loggingSecurity; + private static volatile System.Logger securityLogger; + private static final VarHandle LOGGER_HANDLE; + static { + System.err.println("Patch version of EventHelper loaded"); + try { + LOGGER_HANDLE = + MethodHandles.lookup().findStaticVarHandle( + EventHelper.class, "securityLogger", System.Logger.class); + } catch (ReflectiveOperationException e) { + throw new Error(e); + } + } + // a patch module to help this test ensure events are logged when + // bootstrap logger is in use + private static final System.Logger.Level LOG_LEVEL = System.Logger.Level.INFO; + + // helper class used for logging security related events for now + private static final String SECURITY_LOGGER_NAME = "jdk.event.security"; + + + public static void logTLSHandshakeEvent(Instant start, + String peerHost, + int peerPort, + String cipherSuite, + String protocolVersion, + long peerCertId) { + assert securityLogger != null; + String prepend = getDurationString(start); + securityLogger.log(LOG_LEVEL, prepend + + " TLSHandshake: {0}:{1,number,#}, {2}, {3}, {4,number,#}", + peerHost, peerPort, protocolVersion, cipherSuite, peerCertId); + } + + public static void logSecurityPropertyEvent(String key, + String value) { + + assert securityLogger != null; + securityLogger.log(LOG_LEVEL, + "SecurityPropertyModification: key:{0}, value:{1}", key, value); + } + + public static void logX509ValidationEvent(long anchorCertId, + long[] certIds) { + assert securityLogger != null; + String codes = LongStream.of(certIds) + .mapToObj(Long::toString) + .collect(Collectors.joining(", ")); + securityLogger.log(LOG_LEVEL, + "ValidationChain: {0,number,#}, {1}", anchorCertId, codes); + } + + public static void logX509CertificateEvent(String algId, + String serialNum, + String subject, + String issuer, + String keyType, + int length, + long certId, + long beginDate, + long endDate) { + assert securityLogger != null; + securityLogger.log(LOG_LEVEL, "X509Certificate: Alg:{0}, Serial:{1}" + + ", Subject:{2}, Issuer:{3}, Key type:{4}, Length:{5,number,#}" + + ", Cert Id:{6,number,#}, Valid from:{7}, Valid until:{8}", + algId, serialNum, subject, issuer, keyType, length, + certId, new Date(beginDate), new Date(endDate)); + } + + /** + * Method to calculate a duration timestamp for events which measure + * the start and end times of certain operations. + * @param start Instant indicating when event started recording + * @return A string representing duraction from start time to + * time of this method call. Empty string is start is null. + */ + private static String getDurationString(Instant start) { + if (start != null) { + if (start.equals(Instant.MIN)) { + return "N/A"; + } + Duration duration = Duration.between(start, Instant.now()); + long micros = duration.toNanos() / 1_000; + if (micros < 1_000_000) { + return "duration = " + (micros / 1_000.0) + " ms:"; + } else { + return "duration = " + ((micros / 1_000) / 1_000.0) + " s:"; + } + } else { + return ""; + } + } + + /** + * Helper to determine if security events are being logged + * at a preconfigured logging level. The configuration value + * is read once at class initialization. + * + * @return boolean indicating whether an event should be logged + */ + public static boolean isLoggingSecurity() { + // Avoid a bootstrap issue where the commitEvent attempts to + // trigger early loading of System Logger but where + // the verification process still has JarFiles locked + if (securityLogger == null && !JUJA.isInitializing()) { + LOGGER_HANDLE.compareAndSet( null, System.getLogger(SECURITY_LOGGER_NAME)); + loggingSecurity = securityLogger.isLoggable(LOG_LEVEL); + } + return loggingSecurity; + } + +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/logging.properties openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/logging.properties --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/logging.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/SignedLoggerFinderTest/logging.properties 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,14 @@ +############################################################ +# Configuration file for log testing +# +############################################################ + +handlers= java.util.logging.ConsoleHandler + +.level= FINE + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + +jdk.event.security.level = FINE + diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerAPIsTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerAPIsTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerAPIsTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerAPIsTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -29,7 +29,7 @@ import java.util.Enumeration; import java.util.List; import java.util.ResourceBundle; -import java.util.Set; + import jdk.internal.logger.BootstrapLogger; import jdk.internal.logger.LazyLoggers; @@ -38,9 +38,10 @@ * @bug 8144460 8144214 * @summary Cover the logXX and LogEvent.valueOf APIs of BootstrapLogger * and logXX APIs of SimpleConsoleLogger. + * @library ../../lib * @modules java.base/jdk.internal.logger:+open * java.base/sun.util.logging - * @build BootstrapLoggerUtils LogStream + * @build LogStream * @run main/othervm BootstrapLoggerAPIsTest */ diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -53,9 +53,10 @@ * @summary JDK implementation specific unit test for JDK internal artifacts. Tests the behavior of bootstrap loggers (and SimpleConsoleLoggers * too). + * @library ../../lib * @modules java.base/jdk.internal.logger:+open * java.logging - * @build BootstrapLoggerUtils LogStream + * @build LogStream * @run main/othervm BootstrapLoggerTest NO_SECURITY * @run main/othervm BootstrapLoggerTest SECURE * @run main/othervm/timeout=120 BootstrapLoggerTest SECURE_AND_WAIT diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerUtils.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerUtils.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerUtils.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerUtils.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.function.BooleanSupplier; - -import jdk.internal.logger.BootstrapLogger; - -class BootstrapLoggerUtils { - - private static final Field IS_BOOTED; - private static final Method AWAIT_PENDING; - - static { - try { - IS_BOOTED = BootstrapLogger.class.getDeclaredField("isBooted"); - IS_BOOTED.setAccessible(true); - // private reflection hook that allows us to test wait until all - // the tasks pending in the BootstrapExecutor are finished. - AWAIT_PENDING = BootstrapLogger.class.getDeclaredMethod("awaitPendingTasks"); - AWAIT_PENDING.setAccessible(true); - } catch (Exception ex) { - throw new ExceptionInInitializerError(ex); - } - } - - static void setBootedHook(BooleanSupplier supplier) throws IllegalAccessException { - IS_BOOTED.set(null, supplier); - } - - static void awaitPending() { - try { - AWAIT_PENDING.invoke(null); - } catch (IllegalAccessException | IllegalArgumentException - | InvocationTargetException ex) { - ex.printStackTrace(); - } - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/LogStream.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/LogStream.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/LogStream.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/LogStream.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -25,8 +25,6 @@ import java.io.OutputStream; import java.io.PrintStream; -import jdk.internal.logger.BootstrapLogger; - /** * We use an instance of this class to check what the logging system has printed * on System.err. diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/lib/BootstrapLoggerUtils.java openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/lib/BootstrapLoggerUtils.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/System/LoggerFinder/lib/BootstrapLoggerUtils.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/System/LoggerFinder/lib/BootstrapLoggerUtils.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2015, 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.function.BooleanSupplier; + +import jdk.internal.logger.BootstrapLogger; + +public final class BootstrapLoggerUtils { + + private static final Field IS_BOOTED; + private static final Method AWAIT_PENDING; + + static { + try { + IS_BOOTED = BootstrapLogger.class.getDeclaredField("isBooted"); + IS_BOOTED.setAccessible(true); + // private reflection hook that allows us to test wait until all + // the tasks pending in the BootstrapExecutor are finished. + AWAIT_PENDING = BootstrapLogger.class.getDeclaredMethod("awaitPendingTasks"); + AWAIT_PENDING.setAccessible(true); + } catch (Exception ex) { + throw new ExceptionInInitializerError(ex); + } + } + + public static void setBootedHook(BooleanSupplier supplier) throws IllegalAccessException { + IS_BOOTED.set(null, supplier); + } + + public static void awaitPending() { + try { + AWAIT_PENDING.invoke(null); + } catch (IllegalAccessException | IllegalArgumentException + | InvocationTargetException ex) { + ex.printStackTrace(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleBaseTest.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleBaseTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleBaseTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleBaseTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, 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 @@ -40,7 +40,14 @@ abstract class VarHandleBaseTest { static final int ITERS = Integer.getInteger("iters", 1); - static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 10); + + // More resilience for Weak* tests. These operations may spuriously + // fail, and so we do several attempts with delay on failure. + // Be mindful of worst-case total time on test, which would be at + // roughly (delay*attempts) milliseconds. + // + static final int WEAK_ATTEMPTS = Integer.getInteger("weakAttempts", 100); + static final int WEAK_DELAY_MS = Math.max(1, Integer.getInteger("weakDelay", 1)); interface ThrowingRunnable { void run() throws Throwable; @@ -490,4 +497,14 @@ assertEquals(mt.parameterType(mt.parameterCount() - 1), vh.varType()); } } + + static void weakDelay() { + try { + if (WEAK_DELAY_MS > 0) { + Thread.sleep(WEAK_DELAY_MS); + } + } catch (InterruptedException ie) { + // Do nothing. + } + } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java 2024-01-09 21:19:49.000000000 +0000 @@ -442,6 +442,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) vh.get(recv); @@ -459,6 +460,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) vh.get(recv); @@ -476,6 +478,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) vh.get(recv); @@ -493,6 +496,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) vh.get(recv); @@ -730,6 +734,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) vh.get(); @@ -747,6 +752,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) vh.get(); @@ -764,6 +770,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) vh.get(); @@ -781,6 +788,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) vh.get(); @@ -1021,6 +1029,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) vh.get(array, i); @@ -1038,6 +1047,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) vh.get(array, i); @@ -1055,6 +1065,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) vh.get(array, i); @@ -1072,6 +1083,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java 2024-01-09 21:19:49.000000000 +0000 @@ -420,6 +420,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) vh.get(recv); @@ -437,6 +438,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) vh.get(recv); @@ -454,6 +456,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) vh.get(recv); @@ -471,6 +474,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) vh.get(recv); @@ -724,6 +728,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) vh.get(); @@ -741,6 +746,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire((byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) vh.get(); @@ -758,6 +764,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease((byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) vh.get(); @@ -775,6 +782,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet((byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) vh.get(); @@ -1031,6 +1039,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) vh.get(array, i); @@ -1048,6 +1057,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) vh.get(array, i); @@ -1065,6 +1075,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) vh.get(array, i); @@ -1082,6 +1093,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java 2024-01-09 21:19:49.000000000 +0000 @@ -420,6 +420,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) vh.get(recv); @@ -437,6 +438,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) vh.get(recv); @@ -454,6 +456,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) vh.get(recv); @@ -471,6 +474,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) vh.get(recv); @@ -724,6 +728,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain('\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) vh.get(); @@ -741,6 +746,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire('\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) vh.get(); @@ -758,6 +764,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease('\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) vh.get(); @@ -775,6 +782,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet('\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) vh.get(); @@ -1031,6 +1039,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) vh.get(array, i); @@ -1048,6 +1057,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) vh.get(array, i); @@ -1065,6 +1075,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) vh.get(array, i); @@ -1082,6 +1093,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java 2024-01-09 21:19:49.000000000 +0000 @@ -490,6 +490,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) vh.get(recv); @@ -507,6 +508,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) vh.get(recv); @@ -524,6 +526,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) vh.get(recv); @@ -541,6 +544,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) vh.get(recv); @@ -746,6 +750,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) vh.get(); @@ -763,6 +768,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) vh.get(); @@ -780,6 +786,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) vh.get(); @@ -797,6 +804,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) vh.get(); @@ -1005,6 +1013,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) vh.get(array, i); @@ -1022,6 +1031,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) vh.get(array, i); @@ -1039,6 +1049,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) vh.get(array, i); @@ -1056,6 +1067,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java 2024-01-09 21:19:49.000000000 +0000 @@ -490,6 +490,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) vh.get(recv); @@ -507,6 +508,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) vh.get(recv); @@ -524,6 +526,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) vh.get(recv); @@ -541,6 +544,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) vh.get(recv); @@ -746,6 +750,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) vh.get(); @@ -763,6 +768,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) vh.get(); @@ -780,6 +786,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) vh.get(); @@ -797,6 +804,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) vh.get(); @@ -1005,6 +1013,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) vh.get(array, i); @@ -1022,6 +1031,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) vh.get(array, i); @@ -1039,6 +1049,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) vh.get(array, i); @@ -1056,6 +1067,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java 2024-01-09 21:19:49.000000000 +0000 @@ -420,6 +420,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) vh.get(recv); @@ -437,6 +438,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) vh.get(recv); @@ -454,6 +456,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) vh.get(recv); @@ -471,6 +474,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) vh.get(recv); @@ -724,6 +728,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) vh.get(); @@ -741,6 +746,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) vh.get(); @@ -758,6 +764,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) vh.get(); @@ -775,6 +782,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) vh.get(); @@ -1031,6 +1039,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) vh.get(array, i); @@ -1048,6 +1057,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) vh.get(array, i); @@ -1065,6 +1075,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) vh.get(array, i); @@ -1082,6 +1093,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java 2024-01-09 21:19:49.000000000 +0000 @@ -420,6 +420,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) vh.get(recv); @@ -437,6 +438,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) vh.get(recv); @@ -454,6 +456,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) vh.get(recv); @@ -471,6 +474,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) vh.get(recv); @@ -724,6 +728,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) vh.get(); @@ -741,6 +746,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) vh.get(); @@ -758,6 +764,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) vh.get(); @@ -775,6 +782,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) vh.get(); @@ -1031,6 +1039,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) vh.get(array, i); @@ -1048,6 +1057,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) vh.get(array, i); @@ -1065,6 +1075,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) vh.get(array, i); @@ -1082,6 +1093,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java 2024-01-09 21:19:49.000000000 +0000 @@ -420,6 +420,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) vh.get(recv); @@ -437,6 +438,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) vh.get(recv); @@ -454,6 +456,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) vh.get(recv); @@ -471,6 +474,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) vh.get(recv); @@ -724,6 +728,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain((short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) vh.get(); @@ -741,6 +746,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire((short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) vh.get(); @@ -758,6 +764,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease((short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) vh.get(); @@ -775,6 +782,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet((short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) vh.get(); @@ -1031,6 +1039,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) vh.get(array, i); @@ -1048,6 +1057,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) vh.get(array, i); @@ -1065,6 +1075,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) vh.get(array, i); @@ -1082,6 +1093,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java 2024-01-09 21:19:49.000000000 +0000 @@ -519,6 +519,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) vh.get(recv); @@ -536,6 +537,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) vh.get(recv); @@ -553,6 +555,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) vh.get(recv); @@ -570,6 +573,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) vh.get(recv); @@ -759,6 +763,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain("foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) vh.get(); @@ -776,6 +781,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire("bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) vh.get(); @@ -793,6 +799,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease("foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) vh.get(); @@ -810,6 +817,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet("bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) vh.get(); @@ -1002,6 +1010,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) vh.get(array, i); @@ -1019,6 +1028,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) vh.get(array, i); @@ -1036,6 +1046,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) vh.get(array, i); @@ -1053,6 +1064,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java 2024-01-09 21:19:49.000000000 +0000 @@ -1050,6 +1050,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) vh.get(array, i); @@ -1067,6 +1068,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) vh.get(array, i); @@ -1084,6 +1086,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) vh.get(array, i); @@ -1101,6 +1104,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) vh.get(array, i); @@ -1251,6 +1255,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) vh.get(array, i); @@ -1268,6 +1273,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) vh.get(array, i); @@ -1285,6 +1291,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) vh.get(array, i); @@ -1302,6 +1309,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java 2024-01-09 21:19:49.000000000 +0000 @@ -1050,6 +1050,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) vh.get(array, i); @@ -1067,6 +1068,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) vh.get(array, i); @@ -1084,6 +1086,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) vh.get(array, i); @@ -1101,6 +1104,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) vh.get(array, i); @@ -1251,6 +1255,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) vh.get(array, i); @@ -1268,6 +1273,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) vh.get(array, i); @@ -1285,6 +1291,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) vh.get(array, i); @@ -1302,6 +1309,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java 2024-01-09 21:19:49.000000000 +0000 @@ -1234,6 +1234,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) vh.get(array, i); @@ -1251,6 +1252,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) vh.get(array, i); @@ -1268,6 +1270,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) vh.get(array, i); @@ -1285,6 +1288,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) vh.get(array, i); @@ -1545,6 +1549,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) vh.get(array, i); @@ -1562,6 +1567,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) vh.get(array, i); @@ -1579,6 +1585,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) vh.get(array, i); @@ -1596,6 +1603,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java 2024-01-09 21:19:49.000000000 +0000 @@ -1234,6 +1234,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) vh.get(array, i); @@ -1251,6 +1252,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) vh.get(array, i); @@ -1268,6 +1270,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) vh.get(array, i); @@ -1285,6 +1288,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) vh.get(array, i); @@ -1545,6 +1549,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) vh.get(array, i); @@ -1562,6 +1567,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) vh.get(array, i); @@ -1579,6 +1585,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) vh.get(array, i); @@ -1596,6 +1603,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, true, false); + success = (boolean) mh.invokeExact(recv, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, false, true); + success = (boolean) mh.invokeExact(recv, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, true, false); + success = (boolean) mh.invokeExact(recv, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, false, true); + success = (boolean) mh.invokeExact(recv, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -470,9 +479,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(true, false); + success = (boolean) mh.invokeExact(true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(); @@ -487,9 +498,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(false, true); + success = (boolean) mh.invokeExact(false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(); @@ -497,16 +510,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(false, false); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact(false, false); assertEquals(success, false, "failing weakCompareAndSetAcquire boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, true, "failing weakCompareAndSetAcquire boolean value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(true, false); + success = (boolean) mh.invokeExact(true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(); @@ -521,9 +537,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(false, true); + success = (boolean) mh.invokeExact(false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(); @@ -757,9 +775,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, true, false); + success = (boolean) mh.invokeExact(array, i, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -774,9 +794,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, false, true); + success = (boolean) mh.invokeExact(array, i, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -791,9 +813,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, true, false); + success = (boolean) mh.invokeExact(array, i, true, false); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -808,9 +832,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, false, true); + success = (boolean) mh.invokeExact(array, i, false, true); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet boolean"); boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact(recv, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, (byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact(recv, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, (byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact(recv, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact(recv, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -492,9 +501,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact((byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(); @@ -509,9 +520,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact((byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact((byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(); @@ -519,16 +532,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact((byte)0x23, (byte)0x45); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact((byte)0x23, (byte)0x45); assertEquals(success, false, "failing weakCompareAndSetAcquire byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, (byte)0x01, "failing weakCompareAndSetAcquire byte value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact((byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact((byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(); @@ -543,9 +559,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact((byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(); @@ -801,9 +819,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact(array, i, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -818,9 +838,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, (byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact(array, i, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -835,9 +857,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, (byte)0x01, (byte)0x23); + success = (boolean) mh.invokeExact(array, i, (byte)0x01, (byte)0x23); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -852,9 +876,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (byte)0x23, (byte)0x01); + success = (boolean) mh.invokeExact(array, i, (byte)0x23, (byte)0x01); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet byte"); byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, '\u0123', '\u4567'); + success = (boolean) mh.invokeExact(recv, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, '\u4567', '\u0123'); + success = (boolean) mh.invokeExact(recv, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, '\u0123', '\u4567'); + success = (boolean) mh.invokeExact(recv, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, '\u4567', '\u0123'); + success = (boolean) mh.invokeExact(recv, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -492,9 +501,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact('\u0123', '\u4567'); + success = (boolean) mh.invokeExact('\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(); @@ -509,9 +520,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact('\u4567', '\u0123'); + success = (boolean) mh.invokeExact('\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(); @@ -519,16 +532,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact('\u4567', '\u89AB'); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact('\u4567', '\u89AB'); assertEquals(success, false, "failing weakCompareAndSetAcquire char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, '\u0123', "failing weakCompareAndSetAcquire char value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact('\u0123', '\u4567'); + success = (boolean) mh.invokeExact('\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(); @@ -543,9 +559,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact('\u4567', '\u0123'); + success = (boolean) mh.invokeExact('\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(); @@ -801,9 +819,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, '\u0123', '\u4567'); + success = (boolean) mh.invokeExact(array, i, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -818,9 +838,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, '\u4567', '\u0123'); + success = (boolean) mh.invokeExact(array, i, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -835,9 +857,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, '\u0123', '\u4567'); + success = (boolean) mh.invokeExact(array, i, '\u0123', '\u4567'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -852,9 +876,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, '\u4567', '\u0123'); + success = (boolean) mh.invokeExact(array, i, '\u4567', '\u0123'); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet char"); char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0d, 2.0d); + success = (boolean) mh.invokeExact(recv, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, 2.0d, 1.0d); + success = (boolean) mh.invokeExact(recv, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, 1.0d, 2.0d); + success = (boolean) mh.invokeExact(recv, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0d, 1.0d); + success = (boolean) mh.invokeExact(recv, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -414,9 +423,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0d, 2.0d); + success = (boolean) mh.invokeExact(1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(); @@ -431,9 +442,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(2.0d, 1.0d); + success = (boolean) mh.invokeExact(2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(); @@ -441,16 +454,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(2.0d, 3.0d); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact(2.0d, 3.0d); assertEquals(success, false, "failing weakCompareAndSetAcquire double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, 1.0d, "failing weakCompareAndSetAcquire double value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(1.0d, 2.0d); + success = (boolean) mh.invokeExact(1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(); @@ -465,9 +481,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0d, 1.0d); + success = (boolean) mh.invokeExact(2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(); @@ -645,9 +663,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0d, 2.0d); + success = (boolean) mh.invokeExact(array, i, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -662,9 +682,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, 2.0d, 1.0d); + success = (boolean) mh.invokeExact(array, i, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -679,9 +701,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, 1.0d, 2.0d); + success = (boolean) mh.invokeExact(array, i, 1.0d, 2.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -696,9 +720,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0d, 1.0d); + success = (boolean) mh.invokeExact(array, i, 2.0d, 1.0d); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet double"); double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0f, 2.0f); + success = (boolean) mh.invokeExact(recv, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, 2.0f, 1.0f); + success = (boolean) mh.invokeExact(recv, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, 1.0f, 2.0f); + success = (boolean) mh.invokeExact(recv, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0f, 1.0f); + success = (boolean) mh.invokeExact(recv, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -414,9 +423,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0f, 2.0f); + success = (boolean) mh.invokeExact(1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(); @@ -431,9 +442,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(2.0f, 1.0f); + success = (boolean) mh.invokeExact(2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(); @@ -441,16 +454,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(2.0f, 3.0f); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact(2.0f, 3.0f); assertEquals(success, false, "failing weakCompareAndSetAcquire float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, 1.0f, "failing weakCompareAndSetAcquire float value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(1.0f, 2.0f); + success = (boolean) mh.invokeExact(1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(); @@ -465,9 +481,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0f, 1.0f); + success = (boolean) mh.invokeExact(2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(); @@ -645,9 +663,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0f, 2.0f); + success = (boolean) mh.invokeExact(array, i, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -662,9 +682,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, 2.0f, 1.0f); + success = (boolean) mh.invokeExact(array, i, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -679,9 +701,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, 1.0f, 2.0f); + success = (boolean) mh.invokeExact(array, i, 1.0f, 2.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -696,9 +720,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0f, 1.0f); + success = (boolean) mh.invokeExact(array, i, 2.0f, 1.0f); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet float"); float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(recv, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, 0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(recv, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, 0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(recv, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(recv, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -492,9 +501,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(); @@ -509,9 +520,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(); @@ -519,16 +532,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(0x89ABCDEF, 0xCAFEBABE); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact(0x89ABCDEF, 0xCAFEBABE); assertEquals(success, false, "failing weakCompareAndSetAcquire int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, 0x01234567, "failing weakCompareAndSetAcquire int value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(); @@ -543,9 +559,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(); @@ -801,9 +819,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(array, i, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -818,9 +838,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, 0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(array, i, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -835,9 +857,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, 0x01234567, 0x89ABCDEF); + success = (boolean) mh.invokeExact(array, i, 0x01234567, 0x89ABCDEF); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -852,9 +876,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x89ABCDEF, 0x01234567); + success = (boolean) mh.invokeExact(array, i, 0x89ABCDEF, 0x01234567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet int"); int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -492,9 +501,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(); @@ -509,9 +520,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(); @@ -519,16 +532,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL, 0xDEADBEEFDEADBEEFL); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact(0xCAFEBABECAFEBABEL, 0xDEADBEEFDEADBEEFL); assertEquals(success, false, "failing weakCompareAndSetAcquire long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, 0x0123456789ABCDEFL, "failing weakCompareAndSetAcquire long value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(); @@ -543,9 +559,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(); @@ -801,9 +819,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -818,9 +838,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -835,9 +857,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = (boolean) mh.invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -852,9 +876,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = (boolean) mh.invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet long"); long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact(recv, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, (short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact(recv, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, (short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact(recv, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact(recv, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -492,9 +501,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact((short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(); @@ -509,9 +520,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact((short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact((short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(); @@ -519,16 +532,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact((short)0x4567, (short)0x89AB); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact((short)0x4567, (short)0x89AB); assertEquals(success, false, "failing weakCompareAndSetAcquire short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, (short)0x0123, "failing weakCompareAndSetAcquire short value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact((short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact((short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(); @@ -543,9 +559,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact((short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(); @@ -801,9 +819,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact(array, i, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -818,9 +838,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, (short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact(array, i, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -835,9 +857,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, (short)0x0123, (short)0x4567); + success = (boolean) mh.invokeExact(array, i, (short)0x0123, (short)0x4567); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -852,9 +876,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (short)0x4567, (short)0x0123); + success = (boolean) mh.invokeExact(array, i, (short)0x4567, (short)0x0123); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet short"); short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -208,9 +209,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, "foo", "bar"); + success = (boolean) mh.invokeExact(recv, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -225,9 +228,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, "bar", "foo"); + success = (boolean) mh.invokeExact(recv, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -242,9 +247,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, "foo", "bar"); + success = (boolean) mh.invokeExact(recv, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -260,8 +267,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, "bar", "foo"); + success = (boolean) mh.invokeExact(recv, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -392,9 +401,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact("foo", "bar"); + success = (boolean) mh.invokeExact("foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(); @@ -409,9 +420,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact("bar", "foo"); + success = (boolean) mh.invokeExact("bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(); @@ -419,16 +432,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact("bar", "baz"); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact("bar", "baz"); assertEquals(success, false, "failing weakCompareAndSetAcquire String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, "foo", "failing weakCompareAndSetAcquire String value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact("foo", "bar"); + success = (boolean) mh.invokeExact("foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(); @@ -443,9 +459,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact("bar", "foo"); + success = (boolean) mh.invokeExact("bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(); @@ -601,9 +619,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, "foo", "bar"); + success = (boolean) mh.invokeExact(array, i, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -618,9 +638,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, "bar", "foo"); + success = (boolean) mh.invokeExact(array, i, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -635,9 +657,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, "foo", "bar"); + success = (boolean) mh.invokeExact(array, i, "foo", "bar"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -652,9 +676,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, "bar", "foo"); + success = (boolean) mh.invokeExact(array, i, "bar", "foo"); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet String"); String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template 2024-01-09 21:19:49.000000000 +0000 @@ -658,6 +658,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(recv, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) vh.get(recv); @@ -675,6 +676,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(recv, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) vh.get(recv); @@ -692,6 +694,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(recv, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) vh.get(recv); @@ -709,6 +712,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(recv, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) vh.get(recv); @@ -1063,6 +1067,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain($value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) vh.get(); @@ -1080,6 +1085,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire($value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) vh.get(); @@ -1097,6 +1103,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease($value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) vh.get(); @@ -1114,6 +1121,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet($value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) vh.get(); @@ -1471,6 +1479,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1488,6 +1497,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1505,6 +1515,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1522,6 +1533,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template 2024-01-09 21:19:49.000000000 +0000 @@ -1591,6 +1591,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1608,6 +1609,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1625,6 +1627,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1642,6 +1645,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1908,6 +1912,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1925,6 +1930,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetAcquire(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1942,6 +1948,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSetRelease(array, i, VALUE_1, VALUE_2); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) vh.get(array, i); @@ -1959,6 +1966,7 @@ boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) vh.get(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template --- openjdk-lts-11.0.21+9/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template 2024-01-09 21:19:49.000000000 +0000 @@ -30,6 +30,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.ArrayList; @@ -209,9 +210,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, $value1$, $value2$); + success = (boolean) mh.invokeExact(recv, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -226,9 +229,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, $value2$, $value1$); + success = (boolean) mh.invokeExact(recv, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -243,9 +248,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, $value1$, $value2$); + success = (boolean) mh.invokeExact(recv, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -261,8 +268,10 @@ { boolean success = false; + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value2$, $value1$); + success = (boolean) mh.invokeExact(recv, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv); @@ -532,9 +541,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact($value1$, $value2$); + success = (boolean) mh.invokeExact($value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(); @@ -549,9 +560,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact($value2$, $value1$); + success = (boolean) mh.invokeExact($value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(); @@ -559,16 +572,19 @@ } { - boolean success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact($value2$, $value3$); + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); + boolean success = (boolean) mh.invokeExact($value2$, $value3$); assertEquals(success, false, "failing weakCompareAndSetAcquire $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(); assertEquals(x, $value1$, "failing weakCompareAndSetAcquire $type$ value"); } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact($value1$, $value2$); + success = (boolean) mh.invokeExact($value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(); @@ -583,9 +599,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value2$, $value1$); + success = (boolean) mh.invokeExact($value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(); @@ -880,9 +898,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, $value1$, $value2$); + success = (boolean) mh.invokeExact(array, i, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetPlain $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -897,9 +917,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, $value2$, $value1$); + success = (boolean) mh.invokeExact(array, i, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetAcquire $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -914,9 +936,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, $value1$, $value2$); + success = (boolean) mh.invokeExact(array, i, $value1$, $value2$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSetRelease $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i); @@ -931,9 +955,11 @@ } { + MethodHandle mh = hs.get(TestAccessMode.WEAK_COMPARE_AND_SET); boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value2$, $value1$); + success = (boolean) mh.invokeExact(array, i, $value2$, $value1$); + if (!success) weakDelay(); } assertEquals(success, true, "success weakCompareAndSet $type$"); $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B4678055.java openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B4678055.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B4678055.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B4678055.java 2024-01-09 21:19:49.000000000 +0000 @@ -36,8 +36,8 @@ public class B4678055 implements HttpCallback { - static int count = 0; - static String authstring; + static volatile int count = 0; + static volatile String authstring; void errorReply (HttpTransaction req, String reply) throws IOException { req.addResponseHeader ("Connection", "close"); @@ -54,6 +54,7 @@ public void request (HttpTransaction req) { try { + System.out.println("Server handling case: "+ count); authstring = req.getRequestHeader ("Authorization"); System.out.println (authstring); switch (count) { @@ -93,6 +94,7 @@ } count ++; } catch (IOException e) { + System.err.println("Unexpected exception for case " + count + ": " + e); e.printStackTrace(); } } @@ -132,6 +134,8 @@ client ("http://localhost:"+server.getLocalPort()+"/d2/foo.html"); client ("http://localhost:"+server.getLocalPort()+"/d2/foo.html"); } catch (Exception e) { + System.out.println("Client got exception: " + e); + System.out.println("Terminating server"); if (server != null) { server.terminate(); } @@ -145,10 +149,13 @@ if (!checkFinalAuth()) { except ("Wrong authorization string received from client"); } + System.out.println("Terminating server"); server.terminate(); } public static void except (String s) { + System.out.println("Check failed: " + s); + System.out.println("Terminating server"); server.terminate(); throw new RuntimeException (s); } @@ -158,7 +165,7 @@ super (); } - int count = 0; + volatile int count = 0; public PasswordAuthentication getPasswordAuthentication () { PasswordAuthentication pw; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B4722333.java openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B4722333.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B4722333.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B4722333.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -121,13 +121,14 @@ MyAuthenticator auth = new MyAuthenticator (); Authenticator.setDefault (auth); try { - server = new TestHttpServer (new B4722333(), 1, 10, 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + server = new TestHttpServer (new B4722333(), 1, 10, loopback, 0); System.out.println ("Server started: listening on port: " + server.getLocalPort()); - client ("http://localhost:"+server.getLocalPort()+"/d1/d2/d3/foo.html"); - client ("http://localhost:"+server.getLocalPort()+"/ASD/d3/x.html"); - client ("http://localhost:"+server.getLocalPort()+"/biz/d3/x.html"); - client ("http://localhost:"+server.getLocalPort()+"/bar/d3/x.html"); - client ("http://localhost:"+server.getLocalPort()+"/fuzz/d3/x.html"); + client ("http://" + server.getAuthority() + "/d1/d2/d3/foo.html"); + client ("http://" + server.getAuthority() + "/ASD/d3/x.html"); + client ("http://" + server.getAuthority() + "/biz/d3/x.html"); + client ("http://" + server.getAuthority() + "/bar/d3/x.html"); + client ("http://" + server.getAuthority() + "/fuzz/d3/x.html"); } catch (Exception e) { if (server != null) { server.terminate(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B6870935.java openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B6870935.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Authenticator/B6870935.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Authenticator/B6870935.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -240,7 +240,7 @@ try { Authenticator.setDefault (new MyAuthenticator ()); - SocketAddress addr = new InetSocketAddress ("127.0.0.1", port); + SocketAddress addr = new InetSocketAddress (InetAddress.getLoopbackAddress(), port); Proxy proxy = new Proxy (Proxy.Type.HTTP, addr); String s = "http://www.ibm.com"; URL url = new URL(s); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/CookieHandler/CookieManagerTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/CookieHandler/CookieManagerTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/CookieHandler/CookieManagerTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/CookieHandler/CookieManagerTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,13 +26,16 @@ * @summary Unit test for java.net.CookieManager * @bug 6244040 7150552 7051862 * @modules jdk.httpserver - * @run main/othervm -ea CookieManagerTest + * java.logging + * @run main/othervm -ea -esa CookieManagerTest * @author Edward Wang */ import com.sun.net.httpserver.*; import java.io.IOException; import java.net.*; +import java.util.logging.Level; +import java.util.logging.Logger; import static java.net.Proxy.NO_PROXY; public class CookieManagerTest { @@ -59,6 +62,11 @@ } public static void main(String[] args) throws Exception { + // logs everything... + Logger root = Logger.getLogger(""); + root.setLevel(Level.ALL); + root.getHandlers()[0].setLevel(Level.ALL); + startHttpServer(); makeHttpCall(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/DatagramSocket/PortUnreachable.java openjdk-lts-11.0.22+7/test/jdk/java/net/DatagramSocket/PortUnreachable.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/DatagramSocket/PortUnreachable.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/DatagramSocket/PortUnreachable.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, 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 @@ -24,14 +24,18 @@ /** * @test * @bug 4361783 - * @summary Test to see if ICMP Port Unreachable on non-connected - * DatagramSocket causes a SocketException "socket closed" - * exception on Windows 2000. + * @key intermittent + * @summary Test to see if ICMP Port Unreachable on non-connected + * DatagramSocket causes a SocketException "socket closed" + * exception on Windows 2000. + * @run main/othervm PortUnreachable */ + import java.net.BindException; -import java.net.InetAddress; -import java.net.DatagramSocket; import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; +import java.net.InetSocketAddress; public class PortUnreachable { @@ -39,53 +43,93 @@ int serverPort; int clientPort; - public void serverSend() { - try { - InetAddress addr = InetAddress.getLocalHost(); - Thread.currentThread().sleep(1000); - // send a delayed packet which should mean a delayed icmp - // port unreachable - byte b[] = "A late msg".getBytes(); - DatagramPacket packet = new DatagramPacket(b, b.length, addr, - serverPort); - clientSock.send(packet); + public void serverSend() throws Exception { + InetAddress addr = InetAddress.getLocalHost(); + Thread.sleep(1000); + // send a delayed packet which should mean a delayed icmp + // port unreachable + byte b[] = "A late msg".getBytes(); + DatagramPacket packet = new DatagramPacket(b, b.length, addr, + serverPort); + clientSock.send(packet); - DatagramSocket sock = recreateServerSocket(serverPort); - b = "Greetings from the server".getBytes(); - packet = new DatagramPacket(b, b.length, addr, clientPort); - sock.send(packet); - sock.close(); - } catch (Exception e) { - e.printStackTrace(); - } + DatagramSocket sock = recreateServerSocket(serverPort); + b = "Greetings from the server".getBytes(); + packet = new DatagramPacket(b, b.length, addr, clientPort); + sock.send(packet); + Thread.sleep(500); // give time to the kernel to send packet + sock.close(); } DatagramSocket recreateServerSocket (int serverPort) throws Exception { DatagramSocket serverSocket = null; int retryCount = 0; + long sleeptime = 0; System.out.println("Attempting to recreate server socket with port: " + serverPort); + // it's possible that this method intermittently fails, if some other + // process running on the machine grabs the port we want before us, + // and doesn't release it before the 10 * 500 ms are elapsed... while (serverSocket == null) { try { - serverSocket = new DatagramSocket(serverPort); + serverSocket = new DatagramSocket(serverPort, InetAddress.getLocalHost()); } catch (BindException bEx) { - if (retryCount++ < 5) { - Thread.sleep(500); + if (retryCount++ < 10) { + sleeptime += sleepAtLeast(500); } else { - System.out.println("Give up after 5 retries"); + System.out.println("Give up after 10 retries and " + sleeptime(sleeptime)); + System.out.println("Has some other process grabbed port " + serverPort + "?"); throw bEx; } } } System.out.println("PortUnreachableTest.recreateServerSocket: returning socket == " - + serverSocket.getLocalAddress() + ":" + serverSocket.getLocalPort()); + + serverSocket.getLocalAddress() + ":" + serverSocket.getLocalPort() + + " obtained at " + attempt(retryCount) + " attempt with " + sleeptime(sleeptime)); return serverSocket; } - PortUnreachable() throws Exception { + long sleepAtLeast(long millis) throws Exception { + long start = System.nanoTime(); + long ms = millis; + while (ms > 0) { + assert ms < Long.MAX_VALUE/1000_000L; + Thread.sleep(ms); + long elapsedms = (System.nanoTime() - start)/1000_000L; + ms = millis - elapsedms; + } + return millis - ms; + } + + String attempt(int retry) { + switch (retry) { + case 0: return "first"; + case 1: return "second"; + case 2: return "third"; + default: return retry + "th"; + } + } - clientSock = new DatagramSocket(); + String sleeptime(long millis) { + if (millis == 0) return "no sleep"; + long sec = millis / 1000L; + long ms = millis % 1000L; + String sleeptime = ""; + if (millis > 0) { + if (sec > 0) { + sleeptime = "" + sec + " s" + + (ms > 0 ? " " : ""); + } + if (ms > 0 ) { + sleeptime += ms + " ms"; + } + } else sleeptime = millis + " ms"; // should not happen + return sleeptime + " of sleep time"; + } + + PortUnreachable() throws Exception { + clientSock = new DatagramSocket(new InetSocketAddress(InetAddress.getLocalHost(), 0)); clientPort = clientSock.getLocalPort(); } @@ -93,7 +137,7 @@ void execute () throws Exception{ // pick a port for the server - DatagramSocket sock2 = new DatagramSocket(); + DatagramSocket sock2 = new DatagramSocket(new InetSocketAddress(InetAddress.getLocalHost(), 0)); serverPort = sock2.getLocalPort(); // send a burst of packets to the unbound port - we should get back @@ -109,6 +153,7 @@ clientSock.send(packet); serverSend(); + // try to receive b = new byte[25]; packet = new DatagramPacket(b, b.length, addr, serverPort); @@ -121,9 +166,23 @@ } public static void main(String[] args) throws Exception { - PortUnreachable test = new PortUnreachable(); - test.execute(); - } + // A BindException might be thrown intermittently. In that case retry + // 3 times before propagating the exception to finish execution. + int catchCount = 0; + while (true) { + try { + PortUnreachable test = new PortUnreachable(); + test.execute(); + return; + } catch (BindException bEx) { + System.out.println("Failed to bind server: " + bEx); + if (++catchCount > 3) { + System.out.printf("Max retry count exceeded (%d)%n", catchCount); + throw bEx; + } + System.out.printf("Retrying; retry count: %d%n", catchCount); + } + } + } } - diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/DatagramSocket/SendDatagramToBadAddress.java openjdk-lts-11.0.22+7/test/jdk/java/net/DatagramSocket/SendDatagramToBadAddress.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/DatagramSocket/SendDatagramToBadAddress.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/DatagramSocket/SendDatagramToBadAddress.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, 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 @@ -114,8 +114,7 @@ if (OSsupportsFeature()) { print ("running on OS that supports ICMP port unreachable"); } - String host = "127.0.0.1"; - InetAddress addr = InetAddress.getByName(host); + InetAddress addr = InetAddress.getLoopbackAddress(); DatagramSocket sock = new DatagramSocket(); DatagramSocket serversock = new DatagramSocket(0); DatagramPacket p; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java openjdk-lts-11.0.22+7/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, 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 @@ -218,7 +218,8 @@ @Override protected ServerSocket createBindable() throws IOException { - return new ServerSocket(0, 0, InetAddress.getByName("127.0.0.1")); + InetAddress address = InetAddress.getLoopbackAddress(); + return new ServerSocket(0, 0, address); } @Override @@ -240,7 +241,8 @@ @Override protected S createBindable() throws IOException { S server = newHttpServer(); - server.bind(new InetSocketAddress("127.0.0.1", 0), 0); + InetAddress address = InetAddress.getLoopbackAddress(); + server.bind(new InetSocketAddress(address, 0), 0); return server; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/HttpURLConnection/UnmodifiableMaps.java openjdk-lts-11.0.22+7/test/jdk/java/net/HttpURLConnection/UnmodifiableMaps.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/HttpURLConnection/UnmodifiableMaps.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/HttpURLConnection/UnmodifiableMaps.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, 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 @@ -24,11 +24,13 @@ /** * @test * @bug 7128648 + * @library /test/lib * @modules jdk.httpserver * @summary HttpURLConnection.getHeaderFields should return an unmodifiable Map */ import java.io.IOException; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.URI; import java.net.HttpURLConnection; @@ -41,6 +43,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.Headers; import static java.net.Proxy.NO_PROXY; +import jdk.test.lib.net.URIBuilder; public class UnmodifiableMaps { @@ -48,7 +51,12 @@ HttpServer server = startHttpServer(); try { InetSocketAddress address = server.getAddress(); - URI uri = new URI("http://localhost:" + address.getPort() + "/foo"); + URI uri = URIBuilder.newBuilder() + .scheme("http") + .host(address.getAddress()) + .port(address.getPort()) + .path("/foo") + .build(); doClient(uri); } finally { server.stop(0); @@ -78,7 +86,8 @@ // HTTP Server HttpServer startHttpServer() throws IOException { - HttpServer httpServer = HttpServer.create(new InetSocketAddress(0), 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + HttpServer httpServer = HttpServer.create(new InetSocketAddress(loopback, 0), 0); httpServer.createContext("/foo", new SimpleHandler()); httpServer.start(); return httpServer; @@ -146,4 +155,3 @@ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed); if (failed > 0) throw new AssertionError("Some tests failed");} } - diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/ResponseCache/ResponseCacheTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/ResponseCache/ResponseCacheTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/ResponseCache/ResponseCacheTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/ResponseCache/ResponseCacheTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -24,6 +24,7 @@ /* @test * @summary Unit test for java.net.ResponseCache * @bug 4837267 + * @library /test/lib * @author Yingxian Wang */ @@ -31,6 +32,7 @@ import java.util.*; import java.io.*; import javax.net.ssl.*; +import jdk.test.lib.net.URIBuilder; /** * Request should get serviced by the cache handler. Response get @@ -90,14 +92,17 @@ try { fis.close(); } catch (IOException unused) {} } } -static class NameVerifier implements HostnameVerifier { + static class NameVerifier implements HostnameVerifier { public boolean verify(String hostname, SSLSession session) { return true; } } ResponseCacheTest() throws Exception { /* start the server */ - ss = new ServerSocket(0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(loopback, 0)); + (new Thread(this)).start(); /* establish http connection to server */ url1 = new URL("http://localhost/file1.cache"); @@ -126,8 +131,12 @@ http.disconnect(); // testing ResponseCacheHandler.put() - url2 = new URL("http://localhost:" + - Integer.toString(ss.getLocalPort())+"/file2.1"); + url2 = URIBuilder.newBuilder() + .scheme("http") + .host(ss.getInetAddress()) + .port(ss.getLocalPort()) + .path("/file2.1") + .toURL(); http = (HttpURLConnection)url2.openConnection(); System.out.println("responsecode2 is :"+http.getResponseCode()); Map> headers2 = http.getHeaderFields(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/ServerSocket/ThreadStop.java openjdk-lts-11.0.22+7/test/jdk/java/net/ServerSocket/ThreadStop.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/ServerSocket/ThreadStop.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/ServerSocket/ThreadStop.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -39,7 +39,8 @@ ServerSocket ss; Server() throws IOException { - ss = new ServerSocket(0); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); } public int localPort() { @@ -81,7 +82,7 @@ // still in accept() so we connect to server which causes // it to unblock and do JNI-stuff with a pending exception - try (Socket s = new Socket("localhost", svr.localPort())) { + try (Socket s = new Socket(svr.ss.getInetAddress(), svr.localPort())) { } catch (IOException ioe) { } thr.join(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/B8312065.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/B8312065.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/B8312065.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/B8312065.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2023, Alibaba Group Holding Limited. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8312065 + * @summary Socket.connect does not timeout as expected when profiling (i.e. keep receiving signal) + * @requires (os.family != "windows") + * @compile NativeThread.java + * @run main/othervm/native/timeout=120 B8312065 + */ + +import sun.misc.Signal; + +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketTimeoutException; +import java.util.concurrent.TimeUnit; + +public class B8312065 { + public static void main(String[] args) throws Exception { + System.loadLibrary("NativeThread"); + + // Setup SIGPIPE handler + Signal.handle(new Signal("PIPE"), System.out::println); + + long osThreadId = NativeThread.getID(); + + int timeoutMillis = 2000; + int n = 10; + Thread t = new Thread(() -> { + // Send SIGPIPE to the thread every second + for (int i = 0; i < n; i++) { + if (NativeThread.signal(osThreadId, NativeThread.SIGPIPE) != 0) { + System.out.println("Test FAILED: failed to send signal"); + System.exit(1); + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + System.out.println("Test FAILED: unexpected interrupt"); + System.exit(1); + } + } + System.out.println("Test FAILED: Socket.connect blocked " + n + " seconds, " + + "expected around " + timeoutMillis / 1000 + " seconds"); + System.exit(1); + }); + t.setDaemon(true); + t.start(); + + long startTime = System.nanoTime(); + + try { + Socket socket = new Socket(); + // There is no good way to mock SocketTimeoutException, just assume 192.168.255.255 is not in use + socket.connect(new InetSocketAddress("192.168.255.255", 8080), timeoutMillis); + } catch (SocketTimeoutException e) { + long duration = TimeUnit.MILLISECONDS.convert(System.nanoTime() - startTime, TimeUnit.NANOSECONDS); + if (duration >= timeoutMillis) { + System.out.println("Test passed"); + } else { + System.out.println("Test FAILED: duration " + duration + " ms, expected >= " + timeoutMillis + " ms"); + System.exit(1); + } + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/GetLocalAddress.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/GetLocalAddress.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/GetLocalAddress.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/GetLocalAddress.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -45,7 +45,8 @@ int linger = 65546; int value = 0; addr = InetAddress.getLocalHost(); - ss = new ServerSocket(0); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(addr, 0)); port = ss.getLocalPort(); Thread t = new Thread(new GetLocalAddress()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/HttpProxy.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/HttpProxy.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/HttpProxy.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/HttpProxy.java 2024-01-09 21:19:49.000000000 +0000 @@ -132,6 +132,7 @@ public void run() { try { simpleWrite(os, start); } catch (Exception e) {unexpected(e); } + finally { out.println(threadName + ": done"); } }}, threadName)).start(); } @@ -142,6 +143,7 @@ b[1] = (byte) (i % 256); os.write(b); } + out.println("Wrote " + start + " -> " + (start + 100)); } void simpleRead(InputStream is, int start) throws Exception { @@ -156,6 +158,7 @@ if (r != i) throw new Exception("read " + r + " expected " +i); } + out.println("Read " + start + " -> " + (start + 100)); } int bytes(byte b1, byte b2) { @@ -207,6 +210,7 @@ // retrieve the host and port info from the status-line InetSocketAddress serverAddr = getConnectInfo(statusLine); + out.println("Proxy serving CONNECT request to " + serverAddr); //open socket to the server try (Socket serverSocket = new Socket(serverAddr.getAddress(), diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/NativeThread.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/NativeThread.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/NativeThread.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/NativeThread.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class NativeThread { + + public static final int SIGPIPE; + + static { + SIGPIPE = getSIGPIPE(); + } + + public static native long getID(); + + public static native int signal(long threadId, int sig); + + private static native int getSIGPIPE(); +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/NullHost.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/NullHost.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/NullHost.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/NullHost.java 2024-01-09 21:19:49.000000000 +0000 @@ -46,8 +46,10 @@ return svr.getLocalPort(); } + volatile boolean done; public void shutdown() { try { + done = true; svr.close(); } catch (IOException e) { } @@ -56,11 +58,12 @@ public void run() { Socket s; try { - while (true) { + while (!done) { s = svr.accept(); s.close(); } } catch (IOException e) { + if (!done) e.printStackTrace(); } } } @@ -74,13 +77,9 @@ int port = s.getPort(); s.start(); try { - Socket sock = new Socket((String)null, port); - sock.close(); - sock = new Socket((String)null, port, true); - sock.close(); - sock = new Socket((String)null, port, null, 0); - sock.close(); - + try (var sock = new Socket((String)null, port)) {} + try (var sock = new Socket((String)null, port, true)) {} + try (var sock = new Socket((String)null, port, null, 0)) {} } catch (NullPointerException e) { throw new RuntimeException("Got a NPE"); } finally { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SetReceiveBufferSize.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SetReceiveBufferSize.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SetReceiveBufferSize.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SetReceiveBufferSize.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, 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 @@ -28,6 +28,8 @@ * */ +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.Socket; import java.net.ServerSocket; @@ -37,8 +39,10 @@ } public SetReceiveBufferSize() throws Exception { - ServerSocket ss = new ServerSocket(0); - Socket s = new Socket("localhost", ss.getLocalPort()); + ServerSocket ss = new ServerSocket(); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ss.bind(new InetSocketAddress(loopback, 0)); + Socket s = new Socket(loopback, ss.getLocalPort()); Socket accepted = ss.accept(); try { s.setReceiveBufferSize(0); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SetSoLinger.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SetSoLinger.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SetSoLinger.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SetSoLinger.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -27,6 +27,7 @@ * @summary Test Socket.setSoLinger * @run main SetSoLinger * @run main/othervm -Djava.net.preferIPv4Stack=true SetSoLinger + * @run main/othervm -Djava.net.preferIPv6Addresses=true SetSoLinger */ import java.net.*; @@ -37,7 +38,10 @@ public static void main(String args[]) throws Exception { int value; InetAddress addr = InetAddress.getLocalHost(); - ServerSocket ss = new ServerSocket(0); + ServerSocket ss = new ServerSocket(); + + InetSocketAddress socketAddress = new InetSocketAddress(addr, 0); + ss.bind(socketAddress); int port = ss.getLocalPort(); Socket s = new Socket(addr, port); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SoTimeout.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SoTimeout.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SoTimeout.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SoTimeout.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -44,7 +44,8 @@ public static void main(String[] args) throws Exception { addr = InetAddress.getLocalHost(); - serverSocket = new ServerSocket(0); + serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress(addr, 0)); port = serverSocket.getLocalPort(); byte[] b = new byte[12]; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SocketAcceptInterruptTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SocketAcceptInterruptTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SocketAcceptInterruptTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SocketAcceptInterruptTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,153 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8237858 + * @summary PlainSocketImpl.socketAccept() handles EINTR incorrectly + * @requires (os.family != "windows") + * @compile NativeThread.java + * @run main/othervm/native -Djdk.net.usePlainSocketImpl=true SocketAcceptInterruptTest 0 + * @run main/othervm/native -Djdk.net.usePlainSocketImpl=true SocketAcceptInterruptTest 5000 + * @run main/othervm/native SocketAcceptInterruptTest 0 + * @run main/othervm/native SocketAcceptInterruptTest 5000 + */ +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.*; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +public class SocketAcceptInterruptTest { + + public static void main(String[] args) throws Exception { + System.loadLibrary("NativeThread"); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ExecutorService executor = Executors.newFixedThreadPool(1); + + try ( ServerSocket ss = new ServerSocket(0, 50, loopback);) { + Server server = new Server(ss, Integer.parseInt(args[0])); + Future future = executor.submit(server); + long threadId = server.getID(); + + sendSignal(threadId, ss); + sleep(100); + // In failing case server socket will be closed, so we do need to check first + if (!ss.isClosed()) { + // After sending SIGPIPE, create client socket and connect to server + try ( Socket s = new Socket(loopback, ss.getLocalPort()); InputStream in = s.getInputStream();) { + in.read(); // reading one byte is enought for test. + } + } + Result result = future.get(); + if (result.status == Result.FAIL) { + throw result.exception; + } + } finally { + executor.shutdown(); + } + System.out.println("OK!"); + } + + private static void sendSignal(long threadId, ServerSocket ss) { + System.out.println("Sending SIGPIPE to ServerSocket thread."); + int count = 0; + while (!ss.isClosed() && count++ < 20) { + sleep(10); + if (NativeThread.signal(threadId, NativeThread.SIGPIPE) != 0) { + throw new RuntimeException("Failed to interrupt the server thread."); + } + } + } + + private static void sleep(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException e) { + // ignore the exception. + } + } + + static class Server implements Callable { + + private volatile long threadId; + private final ServerSocket serverSocket; + private final int timeout; + + public Server(ServerSocket ss, int timeout) { + serverSocket = ss; + this.timeout = timeout; + } + + @Override + public Result call() { + try { + threadId = NativeThread.getID(); + serverSocket.setSoTimeout(timeout); + try ( Socket socket = serverSocket.accept(); + OutputStream outputStream = socket.getOutputStream();) { + outputStream.write("Hello!".getBytes()); + return new Result(Result.SUCCESS, null); + } + } catch (IOException e) { + close(); + return new Result(Result.FAIL, e); + } + } + + long getID() { + while (threadId == 0) { + sleep(5); + } + return threadId; + } + + private void close() { + if (!serverSocket.isClosed()) { + try { + serverSocket.close(); + } catch (IOException ex) { + // ignore the exception + } + } + } + } + + static class Result { + + static final int SUCCESS = 0; + static final int FAIL = 1; + final int status; + final Exception exception; + + public Result(int status, Exception ex) { + this.status = status; + exception = ex; + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SocketReadInterruptTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SocketReadInterruptTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/SocketReadInterruptTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/SocketReadInterruptTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,181 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8237858 + * @summary PlainSocketImpl.socketAccept() handles EINTR incorrectly + * @requires (os.family != "windows") + * @compile NativeThread.java + * @run main/othervm/native -Djdk.net.usePlainSocketImpl=true SocketReadInterruptTest 2000 3000 + * @run main/othervm/native SocketReadInterruptTest 2000 3000 + * @run main/othervm/native -Djdk.net.usePlainSocketImpl=true SocketReadInterruptTest 2000 0 + * @run main/othervm/native SocketReadInterruptTest 2000 0 + */ +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetAddress; +import java.net.ServerSocket; + +import java.net.*; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +public class SocketReadInterruptTest { + + public static void main(String[] args) throws Exception { + System.loadLibrary("NativeThread"); + ExecutorService executor = Executors.newFixedThreadPool(2); + InetAddress loopback = InetAddress.getLoopbackAddress(); + + try ( ServerSocket ss = new ServerSocket(0, 50, loopback); + Socket s1 = new Socket(loopback, ss.getLocalPort());) { + Server server = new Server(ss, Integer.parseInt(args[0])); + Future f1 = executor.submit(server); + + Client client = new Client(s1, Integer.parseInt(args[1])); + Future f2 = executor.submit(client); + long threadId = client.getID(); + + sleep(200); + System.out.println("Sending SIGPIPE to client thread."); + if (NativeThread.signal(threadId, NativeThread.SIGPIPE) != 0) { + throw new RuntimeException("Failed to interrupt the thread."); + } + + Result r1 = f1.get(); + if (r1.status == Result.FAIL) { + throw r1.exception; + } + + Result r2 = f2.get(); + if (r2.status == Result.FAIL) { + throw r2.exception; + } + System.out.println("OK!"); + } finally { + executor.shutdown(); + } + } + + private static void sleep(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + + static class Client implements Callable { + + private volatile long threadId; + private final Socket client; + private final int timeout; + + public Client(Socket s, int timeout) { + client = s; + this.timeout = timeout; + } + + @Override + public Result call() { + threadId = NativeThread.getID(); + byte[] arr = new byte[64]; + try ( InputStream in = client.getInputStream();) { + client.setSoTimeout(timeout); + in.read(arr); + return new Result(Result.SUCCESS, null); + } catch (IOException ex) { + close(); + return new Result(Result.FAIL, ex); + } + } + + long getID() { + while (threadId == 0) { + sleep(5); + } + return threadId; + } + + void close() { + if (!client.isClosed()) { + try { + client.close(); + } catch (IOException ex) { + // ignore the exception. + } + } + } + } + + static class Server implements Callable { + + private final ServerSocket serverSocket; + private final int timeout; + + public Server(ServerSocket ss, int timeout) { + serverSocket = ss; + this.timeout = timeout; + } + + @Override + public Result call() { + try { + try ( Socket client = serverSocket.accept(); OutputStream outputStream = client.getOutputStream();) { + sleep(timeout); + outputStream.write("This is just a test string.".getBytes()); + return new Result(Result.SUCCESS, null); + } + } catch (IOException e) { + close(); + return new Result(Result.FAIL, e); + } + } + + public void close() { + if (!serverSocket.isClosed()) { + try { + serverSocket.close(); + } catch (IOException ex) { + } + } + } + } + + static class Result { + + static final int SUCCESS = 0; + static final int FAIL = 1; + final int status; + final Exception exception; + + public Result(int status, Exception ex) { + this.status = status; + exception = ex; + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/TestAfterClose.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/TestAfterClose.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/TestAfterClose.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/TestAfterClose.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, 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 @@ -39,8 +39,9 @@ public static void main(String[] args) { try { - ServerSocket ss = new ServerSocket(0, 0, null); - Socket socket = new Socket("localhost", ss.getLocalPort()); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ServerSocket ss = new ServerSocket(0, 0, loopback); + Socket socket = new Socket(loopback, ss.getLocalPort()); ss.accept(); ss.close(); test(socket); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/UrgentDataTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/UrgentDataTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/UrgentDataTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/UrgentDataTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -54,10 +54,12 @@ try { UrgentDataTest test = new UrgentDataTest (); if (args.length == 0) { - test.listener = new ServerSocket (0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + test.listener = new ServerSocket (); + test.listener.bind(new InetSocketAddress(loopback, 0)); test.isClient = true; test.isServer = true; - test.clHost = "127.0.0.1"; + test.clHost = loopback.getHostAddress(); test.clPort = test.listener.getLocalPort(); test.run(); } else if (args[0].equals ("-server")) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/asyncClose/Race.java openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/asyncClose/Race.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/asyncClose/Race.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/asyncClose/Race.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -28,6 +28,8 @@ */ import java.io.InputStream; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.ConnectException; @@ -40,12 +42,14 @@ final static int THREADS = 100; public static void main(String[] args) throws Exception { - try (ServerSocket ss = new ServerSocket(0)) { + try (ServerSocket ss = new ServerSocket()) { + InetAddress loopback = InetAddress.getLoopbackAddress(); + ss.bind(new InetSocketAddress(loopback, 0)); final int port = ss.getLocalPort(); final Phaser phaser = new Phaser(THREADS + 1); for (int i=0; i<100; i++) { try { - final Socket s = new Socket("localhost", port); + final Socket s = new Socket(loopback, port); s.setSoLinger(false, 0); try (Socket sa = ss.accept()) { sa.setSoLinger(false, 0); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/libNativeThread.c openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/libNativeThread.c --- openjdk-lts-11.0.21+9/test/jdk/java/net/Socket/libNativeThread.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/Socket/libNativeThread.c 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +#include +#include +#include +#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) +#include +#endif + +/* + * Class: NativeThread + * Method: getID + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_NativeThread_getID(JNIEnv *env, jclass class) +{ + #if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) + return (jlong)pthread_self(); + #else + return 0; + #endif +} + +/* + * Class: NativeThread + * Method: signal + * Signature: (JI)I + */ +JNIEXPORT jint JNICALL Java_NativeThread_signal(JNIEnv *env, jclass class, jlong thread, jint sig) +{ + #if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) + return pthread_kill((pthread_t)thread, sig); + #else + return 0; + #endif +} + +/* + * Class: NativeThread + * Method: getSIGPIPE + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_NativeThread_getSIGPIPE(JNIEnv *env, jclass class) +{ + #if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) + return SIGPIPE; + #else + return 0; + #endif +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/SocketOption/OptionsTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/SocketOption/OptionsTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/SocketOption/OptionsTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/SocketOption/OptionsTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -99,8 +99,8 @@ static void doSocketTests() throws Exception { try ( - ServerSocket srv = new ServerSocket(0); - Socket c = new Socket("127.0.0.1", srv.getLocalPort()); + ServerSocket srv = new ServerSocket(0, 50, InetAddress.getLoopbackAddress()); + Socket c = new Socket(InetAddress.getLoopbackAddress(), srv.getLocalPort()); Socket s = srv.accept(); ) { Set> options = c.supportedOptions(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URL/GetContent.java openjdk-lts-11.0.22+7/test/jdk/java/net/URL/GetContent.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URL/GetContent.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URL/GetContent.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -24,11 +24,13 @@ /** * @test * @bug 4145315 + * @library /test/lib * @summary Test a read from nonexistant URL */ import java.net.*; import java.io.*; +import jdk.test.lib.net.URIBuilder; public class GetContent implements Runnable { @@ -71,10 +73,12 @@ boolean error = true; try { - String name = "http://localhost:" + ss.getLocalPort() + - "/no-such-name"; - java.net.URL url = null; - url = new java.net.URL(name); + java.net.URL url = URIBuilder.newBuilder() + .scheme("http") + .host(ss.getInetAddress()) + .port(ss.getLocalPort()) + .path("/no-such-name") + .toURL(); Object obj = url.getContent(); InputStream in = (InputStream) obj; byte buff[] = new byte[200]; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URLClassLoader/HttpTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/URLClassLoader/HttpTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URLClassLoader/HttpTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URLClassLoader/HttpTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -24,6 +24,7 @@ /** * @test * @bug 4636331 + * @library /test/lib * @summary Check that URLClassLoader doesn't create excessive http * connections */ @@ -31,6 +32,8 @@ import java.io.*; import java.util.*; +import jdk.test.lib.net.URIBuilder; + public class HttpTest { /* @@ -119,7 +122,8 @@ } HttpServer() throws Exception { - ss = new ServerSocket(0); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); } public void run() { @@ -200,9 +204,12 @@ HttpServer svr = HttpServer.create(); // create class loader - URL urls[] = - { new URL("http://localhost:" + svr.port() + "/dir1/"), - new URL("http://localhost:" + svr.port() + "/dir2/") }; + URL urls[] = { + URIBuilder.newBuilder().scheme("http").loopback().port(svr.port()) + .path("/dir1/").toURL(), + URIBuilder.newBuilder().scheme("http").loopback().port(svr.port()) + .path("/dir2/").toURL(), + }; URLClassLoader cl = new URLClassLoader(urls); // Test 1 - check that getResource does single HEAD request diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/B5052093.java openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/B5052093.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/B5052093.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/B5052093.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, 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 @@ -64,9 +64,10 @@ } public static void main(String[] args) throws Exception { - server = new TestHttpServer(new B5052093(), 1, 10, 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + server = new TestHttpServer(new B5052093(), 1, 10, loopback, 0); try { - URL url = new URL("http://localhost:"+server.getLocalPort()+"/foo"); + URL url = new URL("http://" + server.getAuthority() + "/foo"); URLConnection conn = url.openConnection(); int i = conn.getContentLength(); long l = conn.getContentLengthLong(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/RedirectLimit.java openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/RedirectLimit.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/RedirectLimit.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/RedirectLimit.java 2024-01-09 21:19:49.000000000 +0000 @@ -73,7 +73,9 @@ // Read until the end of a HTTP request void readOneRequest(InputStream is) throws IOException { int requestEndCount = 0, r; + StringBuilder sb = new StringBuilder(); while ((r = is.read()) != -1) { + sb.append((char)r); if (r == requestEnd[requestEndCount]) { requestEndCount++; if (requestEndCount == 4) { @@ -83,6 +85,7 @@ requestEndCount = 0; } } + System.out.println("Server got request: " + sb.toString()); } public void run() { @@ -90,15 +93,19 @@ readyToStart.countDown(); for (int i=0; i" + tests[i][0] + "<"); PrintStream out = new PrintStream( new BufferedOutputStream( @@ -117,6 +120,9 @@ s.close(); } } catch (Exception e) { + if (!shutdown) { + e.printStackTrace(); + } } } } @@ -170,6 +176,7 @@ actualPhrase + ", expected: " + expectedPhrase); } } catch (IOException e) { + System.err.println("Test failed for >" + tests[i][0] + "<: " + e); e.printStackTrace(); failures++; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/TimeoutTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/TimeoutTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URLConnection/TimeoutTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URLConnection/TimeoutTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -67,7 +67,8 @@ } public void test() throws Exception { - ServerSocket ss = new ServerSocket(0); + ServerSocket ss = new ServerSocket(); + ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); Server s = new Server (ss); try{ URL url = URIBuilder.newBuilder() diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/URLPermission/nstest/LookupTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/URLPermission/nstest/LookupTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/URLPermission/nstest/LookupTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/URLPermission/nstest/LookupTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -36,6 +36,8 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.NetPermission; import java.net.ProxySelector; import java.net.ServerSocket; @@ -104,7 +106,7 @@ String hostsFileName = CWD + "/LookupTestHosts"; System.setProperty("jdk.net.hosts.file", hostsFileName); addMappingToHostsFile("allowedAndFound.com", - "127.0.0.1", + InetAddress.getLoopbackAddress().getHostAddress(), hostsFileName, false); addMappingToHostsFile("notAllowedButFound.com", @@ -131,7 +133,9 @@ private volatile boolean done; public Server() throws IOException { - serverSocket = new ServerSocket(0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress(loopback, 0)); port = serverSocket.getLocalPort(); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -22,6 +22,7 @@ */ import java.io.InputStream; import java.io.OutputStream; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; @@ -72,7 +73,7 @@ : ServerSocketFactory.getDefault(); ss = factory.createServerSocket(); ss.setReuseAddress(true); - ss.bind(new InetSocketAddress("127.0.0.1", 0)); + ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); System.out.println("ServerSocket = " + ss.getClass() + " " + ss); port = ss.getLocalPort(); clientURL = (useSSL ? "https" : "http") + "://localhost:" diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java openjdk-lts-11.0.22+7/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -90,7 +90,6 @@ SSLEngine engineClient = ctx.createSSLEngine(); SSLParameters params = ctx.getSupportedSSLParameters(); params.setApplicationProtocols(new String[]{"proto1", "proto2"}); // server will choose proto2 - params.setProtocols(new String[]{"TLSv1.2"}); // TODO: This is essential. Needs to be protocol impl engineClient.setSSLParameters(params); engineClient.setUseClientMode(true); completion = new CompletableFuture<>(); @@ -100,26 +99,27 @@ SSLFlowDelegate sslClient = new SSLFlowDelegate(engineClient, executor, end, looper); // going to measure how long handshake takes final long start = System.currentTimeMillis(); - sslClient.alpn().whenComplete((String s, Throwable t) -> { + var alpnCF = sslClient.alpn() + .whenComplete((String s, Throwable t) -> { if (t != null) t.printStackTrace(); long endTime = System.currentTimeMillis(); alpn = s; - System.out.println("ALPN: " + alpn); + println("ALPN: " + alpn); long period = (endTime - start); - System.out.printf("Handshake took %d ms\n", period); + printf("Handshake took %d ms", period); }); Subscriber> reader = sslClient.upstreamReader(); Subscriber> writer = sslClient.upstreamWriter(); looper.setReturnSubscriber(reader); // now connect all the pieces srcPublisher.subscribe(writer); - String aa = sslClient.alpn().join(); - System.out.println("AAALPN = " + aa); + String aa = alpnCF.join(); + println("AAALPN = " + aa); } private void handlePublisherException(Object o, Throwable t) { - System.out.println("Src Publisher exception"); + println("Src Publisher exception"); t.printStackTrace(System.out); } @@ -135,29 +135,43 @@ @Test public void run() { long count = 0; - System.out.printf("Submitting %d buffer arrays\n", COUNTER); - System.out.printf("LoopCount should be %d\n", TOTAL_LONGS); + printf("Submitting %d buffer arrays", COUNTER); + printf("LoopCount should be %d", TOTAL_LONGS); for (long i = 0; i < COUNTER; i++) { ByteBuffer b = getBuffer(count); count += LONGS_PER_BUF; srcPublisher.submit(List.of(b)); } - System.out.println("Finished submission. Waiting for loopback"); + println("Finished submission. Waiting for loopback"); // make sure we don't wait for allBytesReceived in case of error. - completion.whenComplete((r,t) -> allBytesReceived.countDown()); + var done = completion.whenComplete((r,t) -> { + try { + if (t != null) { + println("Completion with error: " + t); + t.printStackTrace(System.out); + } else { + println("Successful completion"); + } + } finally { + println("allBytesReceived.countDown()"); + allBytesReceived.countDown(); + } + }); + try { allBytesReceived.await(); } catch (InterruptedException e) { throw new RuntimeException(e); } - System.out.println("All bytes received: "); + println("All bytes received; latch count:" + + allBytesReceived.getCount()); srcPublisher.close(); try { - completion.join(); + done.join(); if (!alpn.equals("proto2")) { throw new RuntimeException("wrong alpn received"); } - System.out.println("OK"); + println("OK"); } finally { executor.shutdownNow(); } @@ -187,6 +201,7 @@ */ static class SSLLoopbackSubscriber implements Subscriber> { private final BlockingQueue buffer; + private final SSLServerSocket serv; private final Socket clientSock; private final SSLSocket serverSock; private final Thread thread1, thread2, thread3; @@ -198,7 +213,7 @@ ExecutorService exec, CountDownLatch allBytesReceived) throws IOException { SSLServerSocketFactory fac = ctx.getServerSocketFactory(); - SSLServerSocket serv = (SSLServerSocket) fac.createServerSocket(); + serv = (SSLServerSocket) fac.createServerSocket(); serv.setReuseAddress(false); serv.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); SSLParameters params = serv.getSSLParameters(); @@ -226,7 +241,7 @@ } private void handlePublisherException(Object o, Throwable t) { - System.out.println("Loopback Publisher exception"); + println("Loopback Publisher exception"); t.printStackTrace(System.out); } @@ -237,20 +252,21 @@ try { InputStream is = clientSock.getInputStream(); final int bufsize = FlowTest.randomRange(512, 16 * 1024); - System.out.println("clientReader: bufsize = " + bufsize); + println("clientReader: bufsize = " + bufsize); while (true) { byte[] buf = new byte[bufsize]; int n = is.read(buf); if (n == -1) { - System.out.println("clientReader close: read " + println("clientReader close: read " + readCount.get() + " bytes"); - System.out.println("clientReader: got EOF. " - + "Waiting signal to close publisher."); + println("clientReader: got EOF. " + + "Waiting signal to close publisher."); allBytesReceived.await(); - System.out.println("clientReader: closing publisher"); + println("clientReader: closing publisher; latch count: " + + allBytesReceived.getCount()); publisher.close(); sleep(2000); - Utils.close(is, clientSock); + Utils.close(is, clientSock, serv); return; } ByteBuffer bb = ByteBuffer.wrap(buf, 0, n); @@ -258,6 +274,7 @@ publisher.submit(List.of(bb)); } } catch (Throwable e) { + println("clientReader failed: " + e); e.printStackTrace(); Utils.close(clientSock); } @@ -276,9 +293,9 @@ if (buf == FlowTest.SENTINEL) { // finished //Utils.sleep(2000); - System.out.println("clientWriter close: " + nbytes + " written"); + println("clientWriter close: " + nbytes + " written"); clientSock.shutdownOutput(); - System.out.println("clientWriter close return"); + println("clientWriter close return"); return; } int len = buf.remaining(); @@ -290,6 +307,7 @@ clientSubscription.request(1); } } catch (Throwable e) { + println("clientWriter failed: " + e); e.printStackTrace(); } } @@ -317,14 +335,15 @@ InputStream is = serverSock.getInputStream(); OutputStream os = serverSock.getOutputStream(); final int bufsize = FlowTest.randomRange(512, 16 * 1024); - System.out.println("serverLoopback: bufsize = " + bufsize); + println("serverLoopback: bufsize = " + bufsize); byte[] bb = new byte[bufsize]; while (true) { int n = is.read(bb); if (n == -1) { sleep(2000); - is.close(); - serverSock.close(); + println("Received EOF: closing server socket"); + Utils.close(is, serverSock, serv); + println("Server socket closed"); return; } os.write(bb, 0, n); @@ -332,6 +351,7 @@ loopCount.addAndGet(n); } } catch (Throwable e) { + println("serverLoopback failed: " + e); e.printStackTrace(); } } @@ -386,18 +406,18 @@ */ static class EndSubscriber implements Subscriber> { - private final long nbytes; + private final long nlongs; private final AtomicLong counter; private volatile Flow.Subscription subscription; private final CompletableFuture completion; private final CountDownLatch allBytesReceived; - EndSubscriber(long nbytes, + EndSubscriber(long nlongs, CompletableFuture completion, CountDownLatch allBytesReceived) { counter = new AtomicLong(0); - this.nbytes = nbytes; + this.nlongs = nlongs; this.completion = completion; this.allBytesReceived = allBytesReceived; } @@ -427,12 +447,16 @@ for (ByteBuffer buf : buffers) { while (buf.hasRemaining()) { + if (buf.remaining() % 8 != 0) { + completion.completeExceptionally( + new AssertionError("Unaligned buffer: " + buf.remaining())); + } long n = buf.getLong(); //if (currval > (FlowTest.TOTAL_LONGS - 50)) { //System.out.println("End: " + currval); //} if (n != currval++) { - System.out.println("ERROR at " + n + " != " + (currval - 1)); + println("ERROR at " + n + " != " + (currval - 1)); completion.completeExceptionally(new RuntimeException("ERROR")); subscription.cancel(); return; @@ -443,25 +467,24 @@ counter.set(currval); subscription.request(1); if (currval >= TOTAL_LONGS) { + println("allBytesReceived.countDown(): currval=" +currval); allBytesReceived.countDown(); } } @Override public void onError(Throwable throwable) { - allBytesReceived.countDown(); completion.completeExceptionally(throwable); } @Override public void onComplete() { long n = counter.get(); - if (n != nbytes) { - System.out.printf("nbytes=%d n=%d\n", nbytes, n); + if (n != nlongs) { + printf("Error at end: nlongs=%d n=%d", nlongs, n); completion.completeExceptionally(new RuntimeException("ERROR AT END")); } else { - System.out.println("DONE OK: counter = " + n); - allBytesReceived.countDown(); + println("DONE OK: counter = " + n); completion.complete(null); } } @@ -548,4 +571,40 @@ e.printStackTrace(); } } + + static final long START = System.nanoTime(); + + static String now() { + long now = System.nanoTime() - START; + long min = now / 1000_000_000L / 60L; + long sec = (now / 1000_000_000L) % 60L; + long mil = (now / 1000_000L) % 1000L; + long nan = (now % 1000_000L); + StringBuilder str = new StringBuilder(); + if (min != 0) { + str = str.append(min).append("m "); + } + if (sec != 0) { + str = str.append(sec).append("s "); + } + if (mil != 0) { + str.append(mil).append("ms "); + } + if (nan != 0) { + str.append(nan).append("ns "); + } + assert now == min * 60L * 1000_000_000L + + sec * 1000_000_000L + + mil * 1000_000L + nan; + return str.toString().trim(); + } + + static void printf(String fmt, Object... args) { + println(String.format(fmt, args)); + } + + static void println(String msg) { + System.out.println("[" + Thread.currentThread() + "] [" + now() + "] " + msg); + } + } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -182,7 +182,7 @@ = new ChannelFactory("DatagramChannel") { InterruptibleChannel create() throws IOException { DatagramChannel dc = DatagramChannel.open(); - InetAddress lb = InetAddress.getByName("127.0.0.1"); + InetAddress lb = InetAddress.getLoopbackAddress(); dc.bind(new InetSocketAddress(lb, 0)); dc.connect(new InetSocketAddress(lb, 80)); return dc; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/Attack.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/Attack.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/Attack.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/Attack.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2019, 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 @@ -22,6 +22,7 @@ */ import java.io.IOException; +import java.net.InetAddress; import java.net.Socket; import java.util.concurrent.CountDownLatch; @@ -42,7 +43,7 @@ @Override public void run() { try { - new Socket("127.0.0.1", 9999).close(); + new Socket(InetAddress.getLoopbackAddress(), 9999).close(); throw new RuntimeException("Connected (not expected)"); } catch (IOException e) { throw new RuntimeException("IOException (not expected)"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/DatagramChannel/Truncate.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/DatagramChannel/Truncate.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/DatagramChannel/Truncate.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/DatagramChannel/Truncate.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8053479 + * @run main Truncate + * @summary Test DatagramChannel receive/read where there are fewer bytes remaining + * in the buffer than are required to hold the datagram. The remainder of the + * datagram should be silently discarded. + */ + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.nio.ByteBuffer; +import java.nio.channels.DatagramChannel; +import java.util.Arrays; +import java.util.stream.IntStream; + +public class Truncate { + static final int LARGE_SIZE = 1000; + static final int SMALL_SIZE = 100; + + public static void main(String[] args) throws Exception { + try (DatagramChannel dc = DatagramChannel.open()) { + dc.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + + // not connected + testReceiveDiscards(dc); + + // connected + dc.connect(dc.getLocalAddress()); + testReceiveDiscards(dc); + testReadDiscards(dc); + testScatteringReadDiscards(dc); + } + } + + /** + * Receive a datagram with a buffer that has fewer bytes remaining than are + * required to hold the datagram. + */ + static void testReceiveDiscards(DatagramChannel dc) throws IOException { + ByteBuffer largeBuffer = send(dc, LARGE_SIZE, dc.getLocalAddress()); + + ByteBuffer smallBuffer = ByteBuffer.allocate(SMALL_SIZE); + SocketAddress sender = dc.receive(smallBuffer); + assertTrue(sender.equals(dc.getLocalAddress())); + + // check buffer/contents + smallBuffer.flip(); + assertTrue(smallBuffer.remaining() == SMALL_SIZE); + assertTrue(Arrays.equals(smallBuffer.array(), 0, SMALL_SIZE, + largeBuffer.array(), 0, SMALL_SIZE)); + } + + /** + * Read a datagram with a buffer that has fewer bytes remaining than are + * required to hold the datagram. + */ + static void testReadDiscards(DatagramChannel dc) throws IOException { + ByteBuffer largeBuffer = send(dc, LARGE_SIZE, dc.getRemoteAddress()); + + ByteBuffer smallBuffer = ByteBuffer.allocate(SMALL_SIZE); + int n = dc.read(smallBuffer); + assertTrue(n == SMALL_SIZE); + + // check buffer/contents + smallBuffer.flip(); + assertTrue(smallBuffer.remaining() == SMALL_SIZE); + assertTrue(Arrays.equals(smallBuffer.array(), 0, SMALL_SIZE, + largeBuffer.array(), 0, SMALL_SIZE)); + } + + /** + * Read a datagram with an array of buffers that have fewer bytes remaining + * than are required to hold the datagram. + */ + static void testScatteringReadDiscards(DatagramChannel dc) throws IOException { + ByteBuffer largeBuffer = send(dc, LARGE_SIZE, dc.getRemoteAddress()); + + ByteBuffer smallBuffer1 = ByteBuffer.allocate(SMALL_SIZE); + ByteBuffer smallBuffer2 = ByteBuffer.allocate(SMALL_SIZE); + ByteBuffer[] bufs = new ByteBuffer[] { smallBuffer1, smallBuffer2 }; + long n = dc.read(bufs); + assertTrue(n == (SMALL_SIZE * bufs.length)); + + // check buffer/contents + smallBuffer1.flip(); + assertTrue(smallBuffer1.remaining() == SMALL_SIZE); + assertTrue(Arrays.equals(smallBuffer1.array(), 0, SMALL_SIZE, + largeBuffer.array(), 0, SMALL_SIZE)); + smallBuffer2.flip(); + assertTrue(smallBuffer2.remaining() == SMALL_SIZE); + assertTrue(Arrays.equals(smallBuffer2.array(), 0, SMALL_SIZE, + largeBuffer.array(), SMALL_SIZE, SMALL_SIZE << 1)); + } + + /** + * Send a datagram of the given size to the given target address. + * @return the buffer with the datagram sent to the target address + */ + static ByteBuffer send(DatagramChannel dc, int size, SocketAddress target) + throws IOException + { + ByteBuffer buffer = ByteBuffer.allocate(size); + IntStream.range(0, size).forEach(i -> buffer.put((byte)i)); + buffer.flip(); + + int n = dc.send(buffer, target); + assertTrue(n == size); + buffer.flip(); + return buffer; + } + + static void assertTrue(boolean e) { + if (!e) throw new RuntimeException(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/Selector/LotsOfCancels.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/Selector/LotsOfCancels.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/Selector/LotsOfCancels.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/Selector/LotsOfCancels.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2009 Google Inc. All Rights Reserved. + * Copyright 2009, 2019, Google Inc. 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 @@ -21,6 +21,7 @@ * questions. */ +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.channels.SelectionKey; @@ -87,7 +88,7 @@ throws Exception { testStartTime = System.nanoTime(); - InetSocketAddress address = new InetSocketAddress("127.0.0.1", 7359); + InetSocketAddress address = new InetSocketAddress(InetAddress.getLoopbackAddress(), 7359); // Create server channel, add it to selector and run epoll_ctl. log("Setting up server"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -27,6 +27,7 @@ */ import java.io.IOException; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; @@ -39,7 +40,6 @@ static volatile boolean keepGoing = true; static int maxAcceptCount = 100; static volatile int acceptCount = 0; - static String host = "127.0.0.1"; static int sensorPort; static int targetPort; @@ -149,7 +149,7 @@ } wake = false; } - s.connect(new InetSocketAddress(host, sensorPort)); + s.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), sensorPort)); try { Thread.sleep(10); } catch (InterruptedException ex) { } @@ -183,7 +183,7 @@ while(keepGoing) { try { final SocketChannel s = SocketChannel.open( - new InetSocketAddress(host, targetPort)); + new InetSocketAddress(InetAddress.getLoopbackAddress(), targetPort)); s.finishConnect(); s.socket().setSoLinger(false, 0); ready = false; diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/CloseRegisteredChannel.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/CloseRegisteredChannel.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/CloseRegisteredChannel.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/CloseRegisteredChannel.java 2024-01-09 21:19:49.000000000 +0000 @@ -41,7 +41,7 @@ //System.out.println ("listening on port " + port); SocketChannel client = SocketChannel.open (); - client.connect (new InetSocketAddress ("127.0.0.1", port)); + client.connect (new InetSocketAddress (InetAddress.getLoopbackAddress(), port)); SocketChannel peer = server.accept (); peer.configureBlocking (true); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/CloseTimeoutChannel.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/CloseTimeoutChannel.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/CloseTimeoutChannel.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/CloseTimeoutChannel.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, 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 @@ -51,7 +51,7 @@ try { System.out.println("Establishing connection"); Socket socket=SocketChannel.open( - new InetSocketAddress("127.0.0.1", port)).socket(); + new InetSocketAddress(InetAddress.getLoopbackAddress(), port)).socket(); OutputStream out=socket.getOutputStream(); InputStream in=socket.getInputStream(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/SocketInheritance.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/SocketInheritance.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/SocketChannel/SocketInheritance.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/SocketChannel/SocketInheritance.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, 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 @@ -65,7 +65,7 @@ // connect to the given port static SocketChannel connect(int port) throws IOException { - InetAddress lh = InetAddress.getByName("127.0.0.1"); + InetAddress lh = InetAddress.getLoopbackAddress(); InetSocketAddress isa = new InetSocketAddress(lh, port); return SocketChannel.open(isa); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, 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 @@ -93,7 +93,7 @@ void scReadAsyncClose() throws IOException { try { SocketChannel sc = SocketChannel.open(new InetSocketAddress( - "127.0.0.1", port)); + InetAddress.getLoopbackAddress(), port)); sc.socket().setSoTimeout(30*1000); doAsyncClose(sc); @@ -115,7 +115,7 @@ void scReadAsyncInterrupt() throws IOException { try { final SocketChannel sc = SocketChannel.open(new InetSocketAddress( - "127.0.0.1", port)); + InetAddress.getLoopbackAddress(), port)); sc.socket().setSoTimeout(30*1000); doAsyncInterrupt(); @@ -141,7 +141,7 @@ void dcReceiveAsyncClose() throws IOException { DatagramChannel dc = DatagramChannel.open(); dc.connect(new InetSocketAddress( - "127.0.0.1", port)); + InetAddress.getLoopbackAddress(), port)); dc.socket().setSoTimeout(30*1000); doAsyncClose(dc); @@ -159,7 +159,7 @@ void dcReceiveAsyncInterrupt() throws IOException { DatagramChannel dc = DatagramChannel.open(); dc.connect(new InetSocketAddress( - "127.0.0.1", port)); + InetAddress.getLoopbackAddress(), port)); dc.socket().setSoTimeout(30*1000); doAsyncInterrupt(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/etc/Shadow.java openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/etc/Shadow.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/channels/etc/Shadow.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/channels/etc/Shadow.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -107,7 +107,7 @@ // connect client socket to port SocketAddress connectAddr = - new InetSocketAddress("127.0.0.1", + new InetSocketAddress(InetAddress.getLoopbackAddress(), serverSocket.getLocalPort()); socket.connect(connectAddr); log.println("connected Socket: " + socket); diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/charset/coders/StreamTimeout.java openjdk-lts-11.0.22+7/test/jdk/java/nio/charset/coders/StreamTimeout.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/charset/coders/StreamTimeout.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/charset/coders/StreamTimeout.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -36,6 +36,7 @@ import java.io.PrintStream; import java.io.Reader; import java.io.Writer; +import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; @@ -47,7 +48,7 @@ private final Socket so; Client(int port) throws IOException { - so = new Socket("127.0.0.1", port); + so = new Socket(InetAddress.getLoopbackAddress(), port); } @Override diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/nio/file/FileStore/Basic.java openjdk-lts-11.0.22+7/test/jdk/java/nio/file/FileStore/Basic.java --- openjdk-lts-11.0.21+9/test/jdk/java/nio/file/FileStore/Basic.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/nio/file/FileStore/Basic.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2022, 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 @@ -57,10 +57,13 @@ throw new RuntimeException("Assertion failed"); } - static void checkWithin1GB(long value1, long value2) { - long diff = Math.abs(value1 - value2); - if (diff > G) - throw new RuntimeException("values differ by more than 1GB"); + static void checkWithin1GB(long expected, long actual) { + long diff = Math.abs(actual - expected); + if (diff > G) { + String msg = String.format("|actual %d - expected %d| = %d (%f G)", + actual, expected, diff, (float)diff/G); + throw new RuntimeException(msg); + } } static void doTests(Path dir) throws IOException { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/rmi/transport/readTimeout/ReadTimeoutTest.java openjdk-lts-11.0.22+7/test/jdk/java/rmi/transport/readTimeout/ReadTimeoutTest.java --- openjdk-lts-11.0.21+9/test/jdk/java/rmi/transport/readTimeout/ReadTimeoutTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/rmi/transport/readTimeout/ReadTimeoutTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, 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 @@ -82,9 +82,9 @@ // Now, connect to that port //Thread.sleep(2000); - System.err.println("(connecting to listening port on 127.0.0.1:" + + System.err.println("(connecting to listening port on localhost:" + port + ")"); - DoS = new Socket("127.0.0.1", port); + DoS = new Socket(InetAddress.getLoopbackAddress(), port); InputStream stream = DoS.getInputStream(); // Read on the socket in the background diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java openjdk-lts-11.0.22+7/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java --- openjdk-lts-11.0.21+9/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, 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 @@ -26,7 +26,6 @@ import java.util.Locale; import java.util.Map; -import static java.util.Calendar.*; import static java.util.GregorianCalendar.*; public class Symbol { diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/util/concurrent/tck/JSR166TestCase.java openjdk-lts-11.0.22+7/test/jdk/java/util/concurrent/tck/JSR166TestCase.java --- openjdk-lts-11.0.21+9/test/jdk/java/util/concurrent/tck/JSR166TestCase.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/util/concurrent/tck/JSR166TestCase.java 2024-01-09 21:19:49.000000000 +0000 @@ -35,30 +35,45 @@ */ /* - * @test - * @summary JSR-166 tck tests, in a number of variations. - * The first is the conformance testing variant, - * while others also test implementation details. + * @test id=default + * @summary Conformance testing variant of JSR-166 tck tests. * @build * * @modules java.management * @run junit/othervm/timeout=1000 JSR166TestCase + */ + +/* + * @test id=forkjoinpool-common-parallelism + * @summary Test implementation details variant of JSR-166 + * tck tests with ForkJoinPool common parallelism. + * @build * + * @modules java.management * @run junit/othervm/timeout=1000 * --add-opens java.base/java.util.concurrent=ALL-UNNAMED * --add-opens java.base/java.lang=ALL-UNNAMED * -Djsr166.testImplementationDetails=true + * -Djava.util.concurrent.ForkJoinPool.common.parallelism=0 * JSR166TestCase * @run junit/othervm/timeout=1000 * --add-opens java.base/java.util.concurrent=ALL-UNNAMED * --add-opens java.base/java.lang=ALL-UNNAMED * -Djsr166.testImplementationDetails=true - * -Djava.util.concurrent.ForkJoinPool.common.parallelism=0 + * -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 + * -Djava.util.secureRandomSeed=true * JSR166TestCase + */ + +/* + * @test id=others + * @summary Remaining test implementation details variant of + * JSR-166 tck tests apart from ForkJoinPool common + * parallelism. + * @build * + * @modules java.management * @run junit/othervm/timeout=1000 * --add-opens java.base/java.util.concurrent=ALL-UNNAMED * --add-opens java.base/java.lang=ALL-UNNAMED * -Djsr166.testImplementationDetails=true - * -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 - * -Djava.util.secureRandomSeed=true * JSR166TestCase * @run junit/othervm/timeout=1000/policy=tck.policy * --add-opens java.base/java.util.concurrent=ALL-UNNAMED diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/util/jar/JarFile/SignedJarPendingBlock.java openjdk-lts-11.0.22+7/test/jdk/java/util/jar/JarFile/SignedJarPendingBlock.java --- openjdk-lts-11.0.21+9/test/jdk/java/util/jar/JarFile/SignedJarPendingBlock.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/util/jar/JarFile/SignedJarPendingBlock.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules java.base/sun.security.tools.keytool + * @summary JARs with pending block files (where .RSA comes before .SF) should verify correctly + */ + +import jdk.security.jarsigner.JarSigner; + +import java.io.File; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyStore; +import java.util.Collections; +import java.util.jar.*; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; +import java.util.zip.ZipOutputStream; + +public class SignedJarPendingBlock { + + public static void main(String[] args) throws Exception { + Path jar = createJarFile(); + Path signed = signJarFile(jar); + Path pendingBlocks = moveBlockFirst(signed); + Path invalid = invalidate(pendingBlocks); + + // 1: Regular signed JAR with no pending blocks should verify + checkSigned(signed); + + // 2: Signed jar with pending blocks should verify + checkSigned(pendingBlocks); + + // 3: Invalid signed jar with pending blocks should throw SecurityException + try { + checkSigned(invalid); + throw new Exception("Expected invalid digest to be detected"); + } catch (SecurityException se) { + // Ignore + } + } + + private static void checkSigned(Path b) throws Exception { + try (JarFile jf = new JarFile(b.toFile(), true)) { + + JarEntry je = jf.getJarEntry("a.txt"); + try (InputStream in = jf.getInputStream(je)) { + in.transferTo(OutputStream.nullOutputStream()); + } + } + } + + /** + * Invalidate signed file by modifying the contents of "a.txt" + */ + private static Path invalidate(Path s) throws Exception{ + Path invalid = Path.of("pending-block-file-invalidated.jar"); + + try (ZipFile zip = new ZipFile(s.toFile()); + ZipOutputStream out = new ZipOutputStream(Files.newOutputStream(invalid))) { + + for (ZipEntry ze : Collections.list(zip.entries())) { + String name = ze.getName(); + out.putNextEntry(new ZipEntry(name)); + + if (name.equals("a.txt")) { + // Change the contents of a.txt to trigger SignatureException + out.write("b".getBytes(StandardCharsets.UTF_8)); + } else { + try (InputStream in = zip.getInputStream(ze)) { + in.transferTo(out); + } + } + } + } + return invalid; + } + + private static Path moveBlockFirst(Path s) throws Exception { + Path b = Path.of("pending-block-file-blockfirst.jar"); + try (ZipFile in = new ZipFile(s.toFile()); + ZipOutputStream out = new ZipOutputStream(Files.newOutputStream(b))) { + + copy("META-INF/MANIFEST.MF", in, out); + + // Switch the order of the RSA and SF files + copy("META-INF/SIGNER.RSA", in, out); + copy("META-INF/SIGNER.SF", in, out); + + copy("a.txt", in, out); + } + return b; + } + + /** + * Copy an entry from a ZipFile to a ZipOutputStream + */ + private static void copy(String name, ZipFile in, ZipOutputStream out) throws Exception { + out.putNextEntry(new ZipEntry(name)); + try (InputStream is = in.getInputStream(in.getEntry(name))) { + is.transferTo(out); + } + } + + private static Path signJarFile(Path j) throws Exception { + Path s = Path.of("pending-block-file-signed.jar"); + + Files.deleteIfExists(Path.of("ks")); + + sun.security.tools.keytool.Main.main( + ("-keystore ks -storepass changeit -keypass changeit -dname" + + " CN=SIGNER" +" -alias r -genkeypair -keyalg rsa").split(" ")); + + char[] pass = "changeit".toCharArray(); + + KeyStore ks = KeyStore.getInstance(new File("ks"), pass); + + KeyStore.PrivateKeyEntry pke = (KeyStore.PrivateKeyEntry) + ks.getEntry("r", new KeyStore.PasswordProtection(pass)); + + JarSigner signer = new JarSigner.Builder(pke) + .digestAlgorithm("SHA-256") + .signatureAlgorithm("SHA256withRSA") + .signerName("SIGNER") + .build(); + + try (ZipFile in = new ZipFile(j.toFile()); + OutputStream out = Files.newOutputStream(s)) { + signer.sign(in, out); + } + + return s; + } + + /** + * Create a jar file with single entry "a.txt" containing "a" + */ + private static Path createJarFile() throws Exception { + Path jar = Path.of("pending-block-file.jar"); + Manifest manifest = new Manifest(); + manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); + try (JarOutputStream out = new JarOutputStream(Files.newOutputStream(jar),manifest)) { + out.putNextEntry(new JarEntry("a.txt")); + out.write("a".getBytes(StandardCharsets.UTF_8)); + } + return jar; + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/java/util/jar/JarFile/VerifySignedJar.java openjdk-lts-11.0.22+7/test/jdk/java/util/jar/JarFile/VerifySignedJar.java --- openjdk-lts-11.0.21+9/test/jdk/java/util/jar/JarFile/VerifySignedJar.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/java/util/jar/JarFile/VerifySignedJar.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2023, 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 @@ -23,48 +23,121 @@ /** * @test + * @library /test/lib + * @modules java.base/sun.security.x509 + * @modules java.base/sun.security.tools.keytool * @bug 4419266 4842702 * @summary Make sure verifying signed Jar doesn't throw SecurityException */ -import java.io.File; -import java.util.jar.JarFile; +import jdk.security.jarsigner.JarSigner; +import sun.security.tools.keytool.CertAndKeyGen; +import sun.security.x509.X500Name; + +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyStore; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.Objects; +import java.util.concurrent.TimeUnit; import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.jar.JarOutputStream; import java.util.zip.ZipEntry; -import java.util.Enumeration; +import java.util.zip.ZipFile; + +import static jdk.test.lib.Utils.runAndCheckException; + public class VerifySignedJar { - private static void Unreached (Object o) - throws Exception - { - // Should never get here - throw new Exception ("Expected exception was not thrown"); - } public static void main(String[] args) throws Exception { - File f = new File(System.getProperty("test.src", "."), "thawjar.jar"); - JarFile jf = new JarFile(f); - try { - // Read entries via Enumeration - for (Enumeration e = jf.entries(); e.hasMoreElements();) - jf.getInputStream((ZipEntry) e.nextElement()); - - // Read entry by name - ZipEntry ze = jf.getEntry("getprop.class"); - JarEntry je = jf.getJarEntry("getprop.class"); - - // Make sure we throw NPE on null objects - try { Unreached (jf.getEntry(null)); } - catch (NullPointerException e) {} - try { Unreached (jf.getJarEntry(null)); } - catch (NullPointerException e) {} + Path j = createJar(); + Path s = signJar(j, keyEntry("cn=duke")); + + try (JarFile jf = new JarFile(s.toFile())) { - try { Unreached (jf.getInputStream(null)); } - catch (NullPointerException e) {} + for (JarEntry e: Collections.list(jf.entries())) { + // Reading entry to trigger verification + jf.getInputStream(e).transferTo(OutputStream.nullOutputStream()); + // Check that all regular files are signed by duke + if (!e.getName().startsWith("META-INF/")) { + checkSignedBy(e, "cn=duke"); + } + } + + // Read ZIP and JAR entries by name + Objects.requireNonNull(jf.getEntry("getprop.class")); + Objects.requireNonNull(jf.getJarEntry("getprop.class")); + + // Make sure we throw NPE on null parameters + runAndCheckException(() -> jf.getEntry(null), NullPointerException.class); + runAndCheckException(() -> jf.getJarEntry(null), NullPointerException.class); + runAndCheckException(() -> jf.getInputStream(null), NullPointerException.class); } catch (SecurityException se) { throw new Exception("Got SecurityException when verifying signed " + "jar:" + se); } } + + // Check that a JAR entry is signed by an expected DN + private static void checkSignedBy(JarEntry e, String expectedDn) throws Exception { + Certificate[] certs = e.getCertificates(); + if (certs == null || certs.length == 0) { + throw new Exception("JarEntry has no certificates: " + e.getName()); + } + + if (certs[0] instanceof X509Certificate) { + X509Certificate x = (X509Certificate)certs[0]; + String name = x.getSubjectX500Principal().getName(); + if (!name.equalsIgnoreCase(expectedDn)) { + throw new Exception(String.format("Expected entry signed by %s, was %s", name, expectedDn)); + } + } else { + throw new Exception("Expected JarEntry.getCertificate to return X509Certificate"); + } + } + + private static Path createJar() throws Exception { + Path j = Path.of("unsigned.jar"); + try (JarOutputStream out = new JarOutputStream(Files.newOutputStream(j))){ + out.putNextEntry(new JarEntry("getprop.class")); + out.write(new byte[] {(byte) 0XCA, (byte) 0XFE, (byte) 0XBA, (byte) 0XBE}); + } + return j; + } + + private static Path signJar(Path j, KeyStore.PrivateKeyEntry entry) throws Exception { + Path s = Path.of("signed.jar"); + + JarSigner signer = new JarSigner.Builder(entry) + .signerName("zigbert") + .digestAlgorithm("SHA-256") + .signatureAlgorithm("SHA256withRSA") + .build(); + + try (ZipFile zip = new ZipFile(j.toFile()); + OutputStream out = Files.newOutputStream(s)) { + signer.sign(zip, out); + } + + return s; + } + + private static KeyStore.PrivateKeyEntry keyEntry(String dname) throws Exception { + + CertAndKeyGen gen = new CertAndKeyGen("RSA", "SHA256withRSA"); + + gen.generate(1048); // Small key size makes test run faster + + var oneDay = TimeUnit.DAYS.toSeconds(1); + Certificate cert = gen.getSelfCertificate(new X500Name(dname), oneDay); + + return new KeyStore.PrivateKeyEntry(gen.getPrivateKey(), + new Certificate[] {cert}); + } } Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/java/util/jar/JarFile/thawjar.jar and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/java/util/jar/JarFile/thawjar.jar differ diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java openjdk-lts-11.0.22+7/test/jdk/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, 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 @@ -40,11 +40,14 @@ import javax.management.remote.JMXServiceURL; import javax.management.remote.rmi.RMIConnectorServer; +import jdk.test.lib.Utils; + /* * @test * @bug 6697180 * @summary test on a client notification deadlock. * @author Shanliang JIANG + * @library /test/lib * * @run clean MultiThreadDeadLockTest * @run build MultiThreadDeadLockTest @@ -53,7 +56,7 @@ public class MultiThreadDeadLockTest { - private static long serverTimeout = 500L; + private static long serverTimeout = Utils.adjustTimeout(500); public static void main(String[] args) throws Exception { print("Create the MBean server"); @@ -122,7 +125,7 @@ StateMachine.setState(CREATE_SOCKET); print("Check whether the user thread gets free to call the mbean."); - if (!ut.waitDone(5000)) { + if (!ut.waitDone(Utils.adjustTimeout(5000))) { throw new RuntimeException("Possible deadlock!"); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/management/remote/mandatory/connection/ReconnectTest.java openjdk-lts-11.0.22+7/test/jdk/javax/management/remote/mandatory/connection/ReconnectTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/management/remote/mandatory/connection/ReconnectTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/management/remote/mandatory/connection/ReconnectTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -26,15 +26,16 @@ * @bug 4927217 * @summary test to reconnect * @author Shanliang JIANG - * + * @library /test/lib * @run clean ReconnectTest * @run build ReconnectTest * @run main ReconnectTest */ +import jdk.test.lib.Utils; + import java.util.*; import java.net.MalformedURLException; -import java.io.IOException; import javax.management.*; import javax.management.remote.*; @@ -46,7 +47,7 @@ private static HashMap env = new HashMap(2); static { - String timeout = "1000"; + String timeout = Long.toString(Utils.adjustTimeout(1000)); env.put("jmx.remote.x.server.connection.timeout", timeout); env.put("jmx.remote.x.client.connection.check.period", timeout); } @@ -104,7 +105,7 @@ for (int i=0; i<3; i++) { System.out.println("************** Sleeping ...... "+i); - Thread.sleep(2000); + Thread.sleep(Utils.adjustTimeout(2000)); System.out.println("Sleep done."); System.out.println("The default domain is " diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/InitialContext/EnvClone.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/InitialContext/EnvClone.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/InitialContext/EnvClone.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/InitialContext/EnvClone.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -34,7 +34,7 @@ public class EnvClone extends InitialContext { - EnvClone(Hashtable env) throws NamingException{ + EnvClone(Hashtable env) throws NamingException{ super(env); } @@ -44,7 +44,7 @@ public static void main(String[] args) throws Exception { - Hashtable env = new Hashtable(5); + Hashtable env = new Hashtable<>(5); EnvClone ctx = new EnvClone(env); if (env == ctx.myProps) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/CompareToEqualsTests.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/CompareToEqualsTests.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/CompareToEqualsTests.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/CompareToEqualsTests.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -74,12 +74,12 @@ byte[] value = "abcxyz".getBytes(); Rdn rdn1 = new Rdn("binary", value); - ArrayList rdns1 = new ArrayList(); + ArrayList rdns1 = new ArrayList<>(); rdns1.add(rdn1); LdapName l1 = new LdapName(rdns1); Rdn rdn2 = new Rdn("binary", value); - ArrayList rdns2 = new ArrayList(); + ArrayList rdns2 = new ArrayList<>(); rdns2.add(rdn2); LdapName l2 = new LdapName(rdns2); checkResults(l1, l2, 0); diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/LdapNameConstruction.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/LdapNameConstruction.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/LdapNameConstruction.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/LdapNameConstruction.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -66,7 +66,7 @@ /** * LdapName creation tests */ - List rdns = new ArrayList(); + List rdns = new ArrayList<>(); rdns.add(new Rdn("o=Food")); rdns.add(new Rdn("ou=Fruits")); rdns.add(rdn3); @@ -82,7 +82,7 @@ } System.out.println("ldapname1 and ldapname2 are equal"); - LdapName name = new LdapName(new ArrayList()); + LdapName name = new LdapName(new ArrayList<>()); System.out.println("Empty ldapname:" + name); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/NameTests.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/NameTests.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/ldap/LdapName/NameTests.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/ldap/LdapName/NameTests.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -42,25 +42,25 @@ String[] rdnStr = new String[] {"one=voilet"}; - ArrayList rdnList = new ArrayList(); + ArrayList rdnList = new ArrayList<>(); for (int i = 0; i < rdnStr.length; i++) { rdnList.add(i, new Rdn(rdnStr[i])); } LdapName dn = new LdapName(rdnList); - Collection rdns = dn.getRdns(); + Collection rdns = dn.getRdns(); System.out.println("size is :" + dn.size()); System.out.println("isEmpty :" + dn.isEmpty()); System.out.println("************Printing as Rdns*********"); - Iterator iter = rdns.iterator(); + Iterator iter = rdns.iterator(); while (iter.hasNext()) { System.out.println(iter.next()); } System.out.println(); System.out.println("************Printing the Enumeration*********"); - Enumeration dnEnum = dn.getAll(); + Enumeration dnEnum = dn.getAll(); while (dnEnum.hasMoreElements()) { System.out.println(dnEnum.nextElement()); } @@ -70,7 +70,7 @@ LdapName nameSuffix = new LdapName("two=Indigo"); System.out.println("addAll():" + dn.addAll(nameSuffix)); - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); list.add(new Rdn("five=Yellow")); System.out.println("Rdn- addAll():" + dn.addAll(list)); @@ -79,7 +79,7 @@ System.out.println("addAll at pos = 2"); System.out.println("addAll():" + dn.addAll(2, nameSuffix)); - list = new ArrayList(); + list = new ArrayList<>(); list.add(new Rdn("four=Green")); System.out.println(); System.out.println("addAll at pos = 3"); @@ -146,12 +146,12 @@ rdnStr[0] + "): " + dn.startsWith( new CompositeName(rdnStr[0]))); - java.util.List prefixList = (dn.getRdns()).subList(0, size /2); + List prefixList = (dn.getRdns()).subList(0, size /2); System.out.println("Rdn - startsWith(" + prefixList + "):" + dn.startsWith(prefixList)); System.out.println("Rdn - startsWith() - empty RDN list:" + - dn.startsWith(new ArrayList())); + dn.startsWith(new ArrayList<>())); System.out.println(); System.out.println("endsWith(" + rdnStr[0] + "):" + @@ -167,7 +167,7 @@ dn.endsWith(prefixList)); System.out.println("Rdn - endsWith() empty RDN list:" + - dn.endsWith(new ArrayList())); + dn.endsWith(new ArrayList<>())); // test clone System.out.println(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DirectoryManager/DummyContext.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DirectoryManager/DummyContext.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DirectoryManager/DummyContext.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DirectoryManager/DummyContext.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -31,13 +31,13 @@ public class DummyContext extends InitialContext { - private Hashtable env; + private Hashtable env; - DummyContext(Hashtable env) throws NamingException { + DummyContext(Hashtable env) throws NamingException { this.env = env; } - public Hashtable getEnvironment() throws NamingException { + public Hashtable getEnvironment() throws NamingException { return env; } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception { CannotProceedException cpe = new CannotProceedException(); - Hashtable env = new Hashtable(1); + Hashtable env = new Hashtable<>(1); cpe.setEnvironment(env); Reference ref = new Reference("java.lang.Object", @@ -52,7 +52,7 @@ } catch (CannotProceedException e) { } - Hashtable contEnv = contCtx.getEnvironment(); + Hashtable contEnv = contCtx.getEnvironment(); if (contEnv.get(NamingManager.CPE) != cpe) { throw new Exception("Test failed: CPE property not set" + " in the continuation context"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DummyContextFactory.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DummyContextFactory.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DummyContextFactory.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DummyContextFactory.java 2024-01-09 21:19:49.000000000 +0000 @@ -126,13 +126,13 @@ public class DummyContext extends InitialContext { - private Hashtable env; + private Hashtable env; - DummyContext(Hashtable env) throws NamingException { + DummyContext(Hashtable env) throws NamingException { this.env = env; } - public Hashtable getEnvironment() { + public Hashtable getEnvironment() { return env; } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DummyContextFactory2.java openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DummyContextFactory2.java --- openjdk-lts-11.0.21+9/test/jdk/javax/naming/spi/DummyContextFactory2.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/naming/spi/DummyContextFactory2.java 2024-01-09 21:19:49.000000000 +0000 @@ -42,13 +42,13 @@ public class DummyContext extends InitialContext { - private Hashtable env; + private Hashtable env; - DummyContext(Hashtable env) throws NamingException { + DummyContext(Hashtable env) throws NamingException { this.env = env; } - public Hashtable getEnvironment() { + public Hashtable getEnvironment() { return env; } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/DTLS/RespondToRetransmit.java openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/DTLS/RespondToRetransmit.java --- openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/DTLS/RespondToRetransmit.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/DTLS/RespondToRetransmit.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,7 +26,8 @@ /* * @test - * @bug 8161086 + * @bug 8161086 8258914 + * @key intermittent * @summary DTLS handshaking fails if some messages were lost * @modules java.base/sun.security.util * @library /test/lib diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.java openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.java --- openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -134,7 +134,7 @@ * e.g. "TLSv1", "TLSv1.1", "TLSv1.2", "DTLSv1.0", "DTLSv1.2". */ public static final String TESTED_SECURITY_PROTOCOL - = System.getProperty("test.security.protocol", "TLS"); + = System.getProperty("test.security.protocol"); /** * Test mode: "norm", "norm_sni" or "krb". * Modes "norm" and "norm_sni" are used to run @@ -738,13 +738,18 @@ case "TLSv1.1": runTests(Ciphers.SUPPORTED_NON_KRB_NON_SHA_CIPHERS); break; - case "DTLSv1.1": + case "DTLS": + case "DTLSv1.2": + case "TLS": case "TLSv1.2": runTests(Ciphers.SUPPORTED_NON_KRB_CIPHERS); break; case "TLSv1.3": runTests(Ciphers.TLS13_CIPHERS); break; + default: + throw new Error("Test error: Unsupported test " + + "security protocol: " + TESTED_SECURITY_PROTOCOL); } break; case "krb": diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java --- openjdk-lts-11.0.21+9/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java 2024-01-09 21:19:49.000000000 +0000 @@ -45,6 +45,7 @@ import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManagerFactory; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import java.security.KeyStore; @@ -222,14 +223,24 @@ protected volatile int serverPort = 0; /* + * What's the server address? null means binding to the wildcard. + */ + protected volatile InetAddress serverAddress = null; + + /* * Define the server side of the test. */ protected void doServerSide() throws Exception { // kick start the server side service SSLContext context = createServerSSLContext(); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); - SSLServerSocket sslServerSocket = - (SSLServerSocket)sslssf.createServerSocket(serverPort); + InetAddress serverAddress = this.serverAddress; + SSLServerSocket sslServerSocket = serverAddress == null ? + (SSLServerSocket)sslssf.createServerSocket(serverPort) + : (SSLServerSocket)sslssf.createServerSocket(); + if (serverAddress != null) { + sslServerSocket.bind(new InetSocketAddress(serverAddress, serverPort)); + } configureServerSocket(sslServerSocket); serverPort = sslServerSocket.getLocalPort(); @@ -317,8 +328,11 @@ try (SSLSocket sslSocket = (SSLSocket)sslsf.createSocket()) { try { configureClientSocket(sslSocket); - sslSocket.connect( - new InetSocketAddress("localhost", serverPort), 15000); + InetAddress serverAddress = this.serverAddress; + InetSocketAddress connectAddress = serverAddress == null + ? new InetSocketAddress("localhost", serverPort) + : new InetSocketAddress(serverAddress, serverPort); + sslSocket.connect(connectAddress, 15000); } catch (IOException ioe) { // The server side may be impacted by naughty test cases or // third party routines, and cannot accept connections. diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/GetSoundBankSecurityException.java openjdk-lts-11.0.22+7/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/GetSoundBankSecurityException.java --- openjdk-lts-11.0.21+9/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/GetSoundBankSecurityException.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/GetSoundBankSecurityException.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright Amazon.com Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +import javax.sound.midi.InvalidMidiDataException; +import javax.sound.midi.MidiSystem; + +/** + * @test + * @bug 8312535 + * @summary MidiSystem.getSoundbank() throws unexpected SecurityException + * @run main/othervm/policy=security.policy GetSoundBankSecurityException + */ +public final class GetSoundBankSecurityException { + + public static void main(String[] args) throws Exception { + File tempFile = new File("sound.bank"); + tempFile.createNewFile(); + try { + MidiSystem.getSoundbank(tempFile); + throw new RuntimeException("InvalidMidiDataException is expected"); + } catch (InvalidMidiDataException ignore) { + } finally { + Files.delete(Paths.get(tempFile.getAbsolutePath())); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/security.policy openjdk-lts-11.0.22+7/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/security.policy --- openjdk-lts-11.0.21+9/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/security.policy 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/security.policy 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,4 @@ +grant { + permission java.io.FilePermission "*", "read,write,delete"; + permission java.util.PropertyPermission "user.dir", "read"; +}; diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JColorChooser/Test6827032.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JColorChooser/Test6827032.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JColorChooser/Test6827032.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JColorChooser/Test6827032.java 2024-01-09 21:19:49.000000000 +0000 @@ -24,7 +24,7 @@ /* * @test * @key headful - * @bug 6827032 + * @bug 6827032 8197825 * @summary Color chooser with drag enabled shouldn't throw NPE * @author Peter Zhelezniakov * @library ../regtesthelpers @@ -38,47 +38,57 @@ public class Test6827032 { - private static volatile Point point; + private static JFrame frame; private static JColorChooser cc; public static void main(String[] args) throws Exception { - UIManager.setLookAndFeel(new NimbusLookAndFeel()); - - Robot robot = new Robot(); - robot.setAutoDelay(50); + try { + UIManager.setLookAndFeel(new NimbusLookAndFeel()); + Robot robot = new Robot(); + robot.setAutoDelay(100); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - createAndShowGUI(); + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + createAndShowGUI(); + } + }); + + robot.waitForIdle(); + robot.delay(1000); + + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + Component previewPanel = Util.findSubComponent(cc, "javax.swing.colorchooser.DefaultPreviewPanel"); + point = previewPanel.getLocationOnScreen(); + } + }); + + point.translate(5, 5); + + robot.mouseMove(point.x, point.y); + robot.waitForIdle(); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + robot.delay(1000); + } finally { + if (frame != null) { + SwingUtilities.invokeAndWait(() -> frame.dispose()); } - }); - - robot.waitForIdle(); - - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - Component previewPanel = Util.findSubComponent(cc, "javax.swing.colorchooser.DefaultPreviewPanel"); - point = previewPanel.getLocationOnScreen(); - } - }); - - point.translate(5, 5); - - robot.mouseMove(point.x, point.y); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.mouseRelease(InputEvent.BUTTON1_MASK); + } } private static void createAndShowGUI() { - JFrame frame = new JFrame(Test6827032.class.getName()); + frame = new JFrame(Test6827032.class.getName()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); cc = new JColorChooser(); cc.setDragEnabled(true); frame.add(cc); frame.pack(); + frame.setLocationRelativeTo(null); frame.setVisible(true); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -23,17 +23,23 @@ import java.awt.Component; import java.awt.Dimension; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsEnvironment; import java.awt.HeadlessException; import java.awt.Point; +import java.awt.Rectangle; import java.awt.Robot; import java.awt.event.ActionListener; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; +import java.io.File; import java.util.Arrays; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import javax.imageio.ImageIO; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFileChooser; @@ -175,12 +181,18 @@ return pt.get(); } - public static void verify(int x1, int x2, int y1, int y2) { + public static void verify(int x1, int x2, int y1, int y2) throws Exception { System.out.println("verify " + x1 + "==" + x2 + "; " + y1 + "==" + y2); if ((Math.abs(x1 - x2) < TOLERANCE_LEVEL) && (Math.abs(y1 - y2) < TOLERANCE_LEVEL)) { System.out.println("Test passed"); } else { + GraphicsConfiguration gc = GraphicsEnvironment. + getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); + Rectangle gcBounds = gc.getBounds(); + BufferedImage bufferedImage = robot.createScreenCapture( + new Rectangle(gcBounds)); + ImageIO.write(bufferedImage, "png",new File("FailureImage.png")); throw new RuntimeException( "Test Failed, setLocation() is not working properly"); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JMenuItem/6249972/bug6249972.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JMenuItem/6249972/bug6249972.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JMenuItem/6249972/bug6249972.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JMenuItem/6249972/bug6249972.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,8 +26,6 @@ * @key headful * @bug 6249972 * @summary Tests that JMenuItem(String,int) handles lower-case mnemonics properly. - * @library ../../../../lib/testlibrary - * @build ExtendedRobot * @author Mikhail Lapshin * @run main bug6249972 */ @@ -36,61 +34,76 @@ import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; +import java.awt.event.InputEvent; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Robot; public class bug6249972 implements ActionListener { - - private JFrame frame; + private static JFrame frame; + private static Robot robot; private JMenu menu; private volatile boolean testPassed = false; + private volatile Point p = null; + private volatile Dimension size = null; public static void main(String[] args) throws Exception { - bug6249972 bugTest = new bug6249972(); - bugTest.test(); + try { + robot = new Robot(); + robot.setAutoDelay(100); + bug6249972 bugTest = new bug6249972(); + robot.waitForIdle(); + robot.delay(1000); + bugTest.test(); + } finally { + if (frame != null) { + SwingUtilities.invokeAndWait(() -> frame.dispose()); + } + } } public bug6249972() throws Exception { - SwingUtilities.invokeAndWait( - new Runnable() { - public void run() { - frame = new JFrame("bug6249972"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - - JMenuBar bar = new JMenuBar(); - frame.setJMenuBar(bar); - - menu = new JMenu("Problem"); - bar.add(menu); - - JMenuItem item = new JMenuItem("JMenuItem(String,'z')", 'z'); - item.addActionListener(bug6249972.this); - menu.add(item); - - frame.setLocationRelativeTo(null); - frame.pack(); - frame.setVisible(true); - } - } - ); + SwingUtilities.invokeAndWait(() -> { + frame = new JFrame("bug6249972"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JMenuBar bar = new JMenuBar(); + frame.setJMenuBar(bar); + + menu = new JMenu("Problem"); + bar.add(menu); + + JMenuItem item = new JMenuItem("JMenuItem(String,'z')", 'z'); + item.addActionListener(bug6249972.this); + menu.add(item); + + frame.setLocationRelativeTo(null); + frame.pack(); + frame.setVisible(true); + }); } private void test() throws Exception { - ExtendedRobot robot = new ExtendedRobot(); - robot.waitForIdle(); - java.awt.Point p = menu.getLocationOnScreen(); - java.awt.Dimension size = menu.getSize(); + SwingUtilities.invokeAndWait(() -> { + p = menu.getLocationOnScreen(); + size = menu.getSize(); + }); p.x += size.width / 2; p.y += size.height / 2; robot.mouseMove(p.x, p.y); - robot.click(); - robot.delay(100); + robot.waitForIdle(); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); robot.waitForIdle(); - robot.type(KeyEvent.VK_Z); + robot.delay(100); + robot.keyPress(KeyEvent.VK_Z); + robot.keyRelease(KeyEvent.VK_Z); robot.waitForIdle(); - frame.dispose(); // Try to stop the event dispatch thread + robot.delay(1000); if (!testPassed) { throw new RuntimeException("JMenuItem(String,int) does not handle " + diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JMenuItem/JMenuItemSetAcceleratorTest.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JMenuItem/JMenuItemSetAcceleratorTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JMenuItem/JMenuItemSetAcceleratorTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JMenuItem/JMenuItemSetAcceleratorTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2016, 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.KeyStroke; +import javax.swing.SwingUtilities; + +/* + * @test + * @key headful + * @bug 8296275 + * @summary To verify the setAccelerator method of JMenuItem. + * @requires (os.family=="mac") + * @run main JMenuItemSetAcceleratorTest + */ + +public class JMenuItemSetAcceleratorTest { + private static JFrame frame; + private static final CountDownLatch actionLatch = new CountDownLatch(1); + private volatile static Point frameAt; + private volatile static Dimension frameSize; + + private static void createAndShow() { + frame = new JFrame("JMenuItem.setAccelerator"); + frame.setLayout(new FlowLayout()); + + JMenuBar bar = new JMenuBar(); + JMenu menu = new JMenu("File"); + JMenuItem menuItem = new JMenuItem("Menu Item"); + + menuItem.setAccelerator( + KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.META_DOWN_MASK)); + menuItem.addActionListener(e -> { + System.out.println("menu item action."); + actionLatch.countDown(); + }); + + menu.add(menuItem); + bar.add(menu); + + frame.setJMenuBar(bar); + frame.setSize(200, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + try { + SwingUtilities.invokeAndWait(JMenuItemSetAcceleratorTest::createAndShow); + + Robot robot = new Robot(); + robot.setAutoDelay(50); + robot.setAutoWaitForIdle(true); + + EventQueue.invokeAndWait(() -> { + frameAt = frame.getLocationOnScreen(); + frameSize = frame.getSize(); + }); + + robot.mouseMove(frameAt.x + frameSize.width / 2, + frameAt.y + frameSize.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + + robot.keyPress(KeyEvent.VK_META); + robot.keyPress(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_META); + + if (!actionLatch.await(5, TimeUnit.SECONDS)) { + throw new RuntimeException( + "Hasn't received the JMenuItem action event by pressing " + + "accelerator keys, test fails."); + } + System.out.println("Test passed, received action event on menu item."); + } finally { + SwingUtilities.invokeAndWait(JMenuItemSetAcceleratorTest::disposeFrame); + } + } + + public static void disposeFrame() { + if (frame != null) { + frame.dispose(); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JPopupMenu/7156657/bug7156657.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JPopupMenu/7156657/bug7156657.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JPopupMenu/7156657/bug7156657.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JPopupMenu/7156657/bug7156657.java 2024-01-09 21:19:49.000000000 +0000 @@ -25,12 +25,18 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Point; import java.awt.Rectangle; import java.awt.Robot; import java.awt.Window; import java.awt.image.BufferedImage; +import java.io.File; import java.util.concurrent.Callable; +import javax.imageio.ImageIO; import javax.swing.JFrame; import javax.swing.JMenuItem; import javax.swing.JPanel; @@ -103,24 +109,56 @@ Rectangle popupRectangle = Util.invokeOnEDT(new Callable() { @Override public Rectangle call() throws Exception { - return popupMenu.getBounds(); + return new Rectangle(popupMenu.getLocationOnScreen(), + popupMenu.getSize()); } }); BufferedImage redBackgroundCapture = robot.createScreenCapture(popupRectangle); + BufferedImage redFrame = robot.createScreenCapture(frame.getBounds()); SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { lowerFrame.getContentPane().setBackground(Color.GREEN); + lowerFrame.invalidate(); } }); robot.waitForIdle(); + robot.delay(1000); // Give frame time to repaint BufferedImage greenBackgroundCapture = robot.createScreenCapture(popupRectangle); + BufferedImage greenFrame = robot.createScreenCapture(frame.getBounds()); if (Util.compareBufferedImages(redBackgroundCapture, greenBackgroundCapture)) { + try { + GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); + for (int i = 0; i < devices.length; i++) { + GraphicsConfiguration[] screens = devices[i].getConfigurations(); + for (int j = 0; j < screens.length; j++) { + BufferedImage fullScreen = robot.createScreenCapture(screens[j].getBounds()); + if (screens[j].getBounds().intersects(popupRectangle)) { + Graphics g = fullScreen.getGraphics(); + g.setColor(Color.CYAN); + g.drawRect(popupRectangle.x - 1, popupRectangle.y - 1, + popupRectangle.width + 2, popupRectangle.height + 2); + g.dispose(); + } + ImageIO.write(fullScreen, "png", new File("dev" + i + "scr" + j + ".png")); + } + } + ImageIO.write(redFrame, "png", new File("redframe.png")); + ImageIO.write(redBackgroundCapture, "png", new File("redbg.png")); + ImageIO.write(greenFrame, "png", new File("greenframe.png")); + ImageIO.write(greenBackgroundCapture, "png", new File("greenbg.png")); + } finally { + SwingUtilities.invokeAndWait(() -> { + frame.dispose(); + lowerFrame.dispose(); + }); + } + robot.waitForIdle(); throw new RuntimeException("The test failed"); } @@ -148,8 +186,8 @@ private static JFrame createFrame() { JFrame result = new JFrame(); - result.setLocation(0, 0); result.setSize(400, 300); + result.setLocationRelativeTo(null); result.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); result.setUndecorated(true); diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JRadioButton/bug4380543.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JRadioButton/bug4380543.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JRadioButton/bug4380543.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JRadioButton/bug4380543.java 2024-01-09 21:19:49.000000000 +0000 @@ -20,15 +20,6 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/* @test - * @bug 4380543 - * @key headful - * @library /java/awt/regtesthelpers - * @build PassFailJFrame - * @summary setMargin() does not work for AbstractButton - * @run main/manual bug4380543 -*/ - import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; @@ -45,6 +36,14 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; +/* @test + * @bug 4380543 + * @key headful + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @summary setMargin() does not work for AbstractButton + * @run main/manual bug4380543 + */ public class bug4380543 { static TestFrame testObj; static String instructions @@ -62,17 +61,16 @@ public static void main(String[] args) throws Exception { - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - try { - passFailJFrame = new PassFailJFrame(instructions); - testObj = new TestFrame(); - //Adding the Test Frame to handle dispose - PassFailJFrame.addTestFrame(testObj); - PassFailJFrame.positionTestFrame(testObj, PassFailJFrame.Position.HORIZONTAL); - } catch (Exception e) { - e.printStackTrace(); - } + SwingUtilities.invokeAndWait(() -> { + try { + passFailJFrame = new PassFailJFrame(instructions); + testObj = new TestFrame(); + //Adding the Test Frame to handle dispose + PassFailJFrame.addTestWindow(testObj); + PassFailJFrame.positionTestWindow(testObj, PassFailJFrame.Position.HORIZONTAL); + testObj.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); } }); passFailJFrame.awaitAndCheck(); @@ -111,9 +109,7 @@ } getContentPane().add(p,BorderLayout.SOUTH); - setSize(500, 300); - setVisible(true); } private static void setLookAndFeel(String laf) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @key headful + * @bug 8223788 + * @summary JSpinner buttons in JColorChooser dialog may capture focus + * using TAB Key + * @run main JSpinnerButtonFocusTest + */ + +import java.awt.Robot; +import java.awt.BorderLayout; +import java.awt.ContainerOrderFocusTraversalPolicy; +import java.awt.event.KeyEvent; +import javax.swing.JFrame; +import javax.swing.JSpinner; +import javax.swing.JSpinner.DefaultEditor; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; + +public class JSpinnerButtonFocusTest { + static JFrame frame; + static Robot robot; + static JSpinner spinner1, spinner2; + static DefaultEditor editor2; + static boolean jTextFieldFocusStatus; + + public static void main(String args[]) throws Exception { + + for (UIManager.LookAndFeelInfo LF : UIManager.getInstalledLookAndFeels()) { + try { + UIManager.setLookAndFeel(LF.getClassName()); + robot = new Robot(); + robot.setAutoDelay(50); + robot.setAutoWaitForIdle(true); + + SwingUtilities.invokeAndWait(() -> { + frame = new JFrame(); + spinner1 = new JSpinner(); + spinner2 = new JSpinner(); + + frame.setLayout(new BorderLayout()); + frame.getContentPane().add(spinner1, BorderLayout.NORTH); + frame.getContentPane().add(spinner2, BorderLayout.SOUTH); + + ((DefaultEditor)spinner1.getEditor()).setFocusable(false); + spinner1.setFocusable(false); + + editor2 = (DefaultEditor) spinner2.getEditor(); + editor2.setFocusable(false); + spinner2.setFocusable(false); + + frame.setFocusTraversalPolicy( + new ContainerOrderFocusTraversalPolicy()); + frame.setFocusTraversalPolicyProvider(true); + + frame.pack(); + frame.setVisible(true); + }); + + robot.waitForIdle(); + pressTab(5); + robot.waitForIdle(); + + SwingUtilities.invokeAndWait(() -> { + jTextFieldFocusStatus = editor2.getTextField().isFocusOwner(); + }); + + if (!jTextFieldFocusStatus) { + throw new RuntimeException( + "Spinner's Text Field doesn't have focus "); + } + } finally { + if(frame != null){ + SwingUtilities.invokeAndWait(frame::dispose); + } + } + } + } + + public static void pressTab(int n) { + for (int i = 0; i < n; i++) { + robot.keyPress(KeyEvent.VK_TAB); + robot.keyRelease(KeyEvent.VK_TAB); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.html openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.html --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.html 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - - - - diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, 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 @@ -21,37 +21,57 @@ * questions. */ -import java.awt.EventQueue; import java.lang.reflect.InvocationTargetException; -import javax.swing.JApplet; +import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; -/** +/* * @test * @bug 4209065 - * @author Georges Saab - * @run applet/manual=yesno bug4209065.html + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @summary To test if the style of the text on the tab matches the description. + * @run main/manual bug4209065 */ -public final class bug4209065 extends JApplet { - @Override - public void init() { - try { - EventQueue.invokeAndWait(this::createTabbedPane); - } catch (InterruptedException | InvocationTargetException e) { - throw new RuntimeException(e); - } - } +public final class bug4209065 { + + private static JFrame frame; + private static final String text = + "If the style of the text on the tabs matches the descriptions," + + "\npress PASS.\n\nNOTE: where a large font is used, the" + + " text may be larger\nthan the tab height but this is OK" + + " and NOT a failure."; - private void createTabbedPane() { + public static void createAndShowGUI() { + + frame = new JFrame("JTabbedPane"); JTabbedPane tp = new JTabbedPane(); - getContentPane().add(tp); - String text = "
If the style of the text on the tabs matches" - + "
the descriptions, press PASS
"; - tp.addTab("
big
", new JLabel(text)); - tp.addTab("
red
", new JLabel(text)); - tp.addTab("
Bold Italic!
", new JLabel(text)); + + tp.addTab("
big
", + new JLabel()); + tp.addTab("
red
", + new JLabel()); + tp.addTab("
Bold Italic!
", + new JLabel()); + + frame.getContentPane().add(tp); + frame.setSize(400, 400); + + PassFailJFrame.addTestWindow(frame); + PassFailJFrame.positionTestWindow(frame, + PassFailJFrame.Position.HORIZONTAL); + frame.setVisible(true); + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + PassFailJFrame passFailJFrame = new PassFailJFrame("JTabbedPane " + + "Test Instructions", text, 5, 19, 35); + SwingUtilities.invokeAndWait(bug4209065::createAndShowGUI); + passFailJFrame.awaitAndCheck(); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTree/6263446/bug6263446.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTree/6263446/bug6263446.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/JTree/6263446/bug6263446.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/JTree/6263446/bug6263446.java 2024-01-09 21:19:49.000000000 +0000 @@ -43,83 +43,92 @@ private static final String ALL = FIRST + " " + SECOND; private static JTree tree; private static Robot robot; + private static JFrame frame; public static void main(String[] args) throws Exception { robot = new Robot(); - robot.setAutoDelay(50); + robot.setAutoDelay(100); SwingUtilities.invokeAndWait(new Runnable() { - + @Override public void run() { createAndShowGUI(); } }); robot.waitForIdle(); + robot.delay(1000); - Point point = getClickPoint(); - robot.mouseMove(point.x, point.y); + try { + Point point = getClickPoint(); + robot.mouseMove(point.x, point.y); - // click count 3 - click(1); - assertNotEditing(); + // click count 3 + click(1); + assertNotEditing(); - click(2); - assertNotEditing(); + click(2); + assertNotEditing(); - click(3); - assertEditing(); - cancelCellEditing(); - assertNotEditing(); + click(3); + assertEditing(); + cancelCellEditing(); + assertNotEditing(); - click(4); - checkSelectedText(FIRST); + click(4); + checkSelectedText(FIRST); - click(5); - checkSelectedText(ALL); + click(5); + checkSelectedText(ALL); - // click count 4 - setClickCountToStart(4); + // click count 4 + setClickCountToStart(4); - click(1); - assertNotEditing(); + click(1); + assertNotEditing(); - click(2); - assertNotEditing(); + click(2); + assertNotEditing(); - click(3); - assertNotEditing(); + click(3); + assertNotEditing(); - click(4); - assertEditing(); - cancelCellEditing(); - assertNotEditing(); + click(4); + assertEditing(); + cancelCellEditing(); + assertNotEditing(); - click(5); - checkSelectedText(FIRST); + click(5); + checkSelectedText(FIRST); - click(6); - checkSelectedText(ALL); + click(6); + checkSelectedText(ALL); - // start path editing - startPathEditing(); - assertEditing(); + // start path editing + startPathEditing(); + assertEditing(); - click(1); - checkSelection(null); + click(1); + checkSelection(null); - click(2); - checkSelection(FIRST); + click(2); + checkSelection(FIRST); - click(3); - checkSelection(ALL); + click(3); + checkSelection(ALL); + } finally { + if (frame != null) { + SwingUtilities.invokeAndWait(() -> frame.dispose()); + } + } } private static void click(int times) { robot.delay(500); for (int i = 0; i < times; i++) { - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.mouseRelease(InputEvent.BUTTON1_MASK); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); } } @@ -148,7 +157,7 @@ private static void createAndShowGUI() { - JFrame frame = new JFrame(); + frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); tree = new JTree(createTreeModel()); @@ -158,6 +167,7 @@ frame.getContentPane().add(tree); frame.pack(); + frame.setLocationRelativeTo(null); frame.setVisible(true); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/Popup/TaskbarPositionTest.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/Popup/TaskbarPositionTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/Popup/TaskbarPositionTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/Popup/TaskbarPositionTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -24,6 +24,8 @@ import java.awt.Component; import java.awt.Dimension; import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.awt.Insets; import java.awt.Point; import java.awt.Rectangle; @@ -33,8 +35,9 @@ import java.awt.event.ActionListener; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; -import java.awt.event.MouseEvent; import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + import javax.swing.AbstractAction; import javax.swing.JComboBox; import javax.swing.JFrame; @@ -47,54 +50,61 @@ import javax.swing.JTextField; import javax.swing.KeyStroke; import javax.swing.SwingUtilities; -import javax.swing.event.PopupMenuListener; import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; -/** +import jtreg.SkippedException; + +/* * @test * @bug 4245587 4474813 4425878 4767478 8015599 * @key headful * @summary Tests the location of the heavy weight popup portion of JComboBox, * JMenu and JPopupMenu. + * The test uses Ctrl+Down Arrow which is a system shortcut on macOS, + * disable it in system settings, otherwise the test will fail * @library ../regtesthelpers + * @library /test/lib * @build Util + * @build jtreg.SkippedException * @run main TaskbarPositionTest */ public class TaskbarPositionTest implements ActionListener { - private boolean done; - private Throwable error; - private static TaskbarPositionTest test; private static JFrame frame; private static JPopupMenu popupMenu; private static JPanel panel; + private static JComboBox combo1; private static JComboBox combo2; - private static JMenuBar menubar; + private static JMenu menu1; private static JMenu menu2; + private static JMenu submenu; + private static Rectangle fullScreenBounds; // The usable desktop space: screen size - screen insets. private static Rectangle screenBounds; - private static String[] numData = { + + private static final String[] numData = { "One", "Two", "Three", "Four", "Five", "Six", "Seven" }; - private static String[] dayData = { + private static final String[] dayData = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; - private static char[] mnDayData = { + private static final char[] mnDayData = { 'M', 'T', 'W', 'R', 'F', 'S', 'U' }; public TaskbarPositionTest() { frame = new JFrame("Use CTRL-down to show a JPopupMenu"); frame.setContentPane(panel = createContentPane()); - frame.setJMenuBar(createMenuBar("1 - First Menu", true)); + frame.setJMenuBar(createMenuBar()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // CTRL-down will show the popup. panel.getInputMap().put(KeyStroke.getKeyStroke( - KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP"); + KeyEvent.VK_DOWN, InputEvent.CTRL_DOWN_MASK), "OPEN_POPUP"); panel.getActionMap().put("OPEN_POPUP", new PopupHandler()); frame.pack(); @@ -103,7 +113,6 @@ fullScreenBounds = new Rectangle(new Point(), toolkit.getScreenSize()); screenBounds = new Rectangle(new Point(), toolkit.getScreenSize()); - // Reduce the screen bounds by the insets. GraphicsConfiguration gc = frame.getGraphicsConfiguration(); if (gc != null) { @@ -116,37 +125,56 @@ } // Place the frame near the bottom. - frame.setLocation(0, screenBounds.y + screenBounds.height - frame.getHeight()); + frame.setLocation(screenBounds.x, + screenBounds.y + screenBounds.height - frame.getHeight()); frame.setVisible(true); } - public static class ComboPopupCheckListener implements PopupMenuListener { + private static class ComboPopupCheckListener implements PopupMenuListener { + @Override public void popupMenuCanceled(PopupMenuEvent ev) { } + @Override public void popupMenuWillBecomeVisible(PopupMenuEvent ev) { } + @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent ev) { - Point cpos = combo1.getLocation(); - SwingUtilities.convertPointToScreen(cpos, panel); + JComboBox combo = (JComboBox) ev.getSource(); + Point comboLoc = combo.getLocationOnScreen(); + + JPopupMenu popupMenu = (JPopupMenu) combo.getUI().getAccessibleChild(combo, 0); - JPopupMenu pm = (JPopupMenu) combo1.getUI().getAccessibleChild(combo1, 0); + Point popupMenuLoc = popupMenu.getLocationOnScreen(); + Dimension popupSize = popupMenu.getSize(); + + isPopupOnScreen(popupMenu, fullScreenBounds); - if (pm != null) { - Point p = pm.getLocation(); - SwingUtilities.convertPointToScreen(p, pm); - if (p.y+1 < cpos.y) { - System.out.println("p.y " + p.y + " cpos.y " + cpos.y); - throw new RuntimeException("ComboBox popup is wrongly aligned"); - } // check that popup was opened down + if (comboLoc.x > 0) { + // The frame is located at the bottom of the screen, + // the combo popups should open upwards + if (popupMenuLoc.y + popupSize.height < comboLoc.y) { + System.err.println("popup " + popupMenuLoc + + " combo " + comboLoc); + throw new RuntimeException("ComboBox popup should open upwards"); + } + } else { + // The frame has been moved to negative position away from + // the bottom of the screen, the combo popup should + // open downwards in this case + if (popupMenuLoc.y + 1 < comboLoc.y) { + System.err.println("popup " + popupMenuLoc + + " combo " + comboLoc); + throw new RuntimeException("ComboBox popup should open downwards"); + } } } } - private class PopupHandler extends AbstractAction { - + private static class PopupHandler extends AbstractAction { + @Override public void actionPerformed(ActionEvent e) { if (!popupMenu.isVisible()) { popupMenu.show((Component) e.getSource(), 40, 40); @@ -155,18 +183,20 @@ } } - class PopupListener extends MouseAdapter { + private static class PopupListener extends MouseAdapter { - private JPopupMenu popup; + private final JPopupMenu popup; public PopupListener(JPopupMenu popup) { this.popup = popup; } + @Override public void mousePressed(MouseEvent e) { maybeShowPopup(e); } + @Override public void mouseReleased(MouseEvent e) { maybeShowPopup(e); } @@ -182,121 +212,137 @@ /** * Tests if the popup is on the screen. */ - public static void isPopupOnScreen(JPopupMenu popup, Rectangle checkBounds) { + private static void isPopupOnScreen(JPopupMenu popup, Rectangle checkBounds) { + if (!popup.isVisible()) { + throw new RuntimeException("Popup not visible"); + } Dimension dim = popup.getSize(); - Point pt = new Point(); - SwingUtilities.convertPointToScreen(pt, popup); + Point pt = popup.getLocationOnScreen(); Rectangle bounds = new Rectangle(pt, dim); if (!SwingUtilities.isRectangleContainingRectangle(checkBounds, bounds)) { - throw new RuntimeException("We do not match! " + checkBounds + " / " + bounds); + throw new RuntimeException("Popup is outside of screen bounds " + + checkBounds + " / " + bounds); } + } + private static void isComboPopupOnScreen(JComboBox comboBox) { + if (!comboBox.isPopupVisible()) { + throw new RuntimeException("ComboBox popup not visible"); + } + JPopupMenu popupMenu = (JPopupMenu) comboBox.getUI().getAccessibleChild(comboBox, 0); + isPopupOnScreen(popupMenu, screenBounds); } - private JPanel createContentPane() { - JPanel panel = new JPanel(); + private JPanel createContentPane() { combo1 = new JComboBox<>(numData); - panel.add(combo1); + combo1.addPopupMenuListener(new ComboPopupCheckListener()); + combo2 = new JComboBox<>(dayData); combo2.setEditable(true); - panel.add(combo2); - panel.setSize(300, 200); + combo2.addPopupMenuListener(new ComboPopupCheckListener()); popupMenu = new JPopupMenu(); - JMenuItem item; for (int i = 0; i < dayData.length; i++) { - item = popupMenu.add(new JMenuItem(dayData[i], mnDayData[i])); + JMenuItem item = popupMenu.add(new JMenuItem(dayData[i], mnDayData[i])); item.addActionListener(this); } - panel.addMouseListener(new PopupListener(popupMenu)); JTextField field = new JTextField("CTRL+down for Popup"); // CTRL-down will show the popup. field.getInputMap().put(KeyStroke.getKeyStroke( - KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP"); + KeyEvent.VK_DOWN, InputEvent.CTRL_DOWN_MASK), "OPEN_POPUP"); field.getActionMap().put("OPEN_POPUP", new PopupHandler()); + JPanel panel = new JPanel(); + panel.add(combo1); + panel.add(combo2); + panel.setSize(300, 200); + panel.addMouseListener(new PopupListener(popupMenu)); panel.add(field); return panel; } - /** - * @param str name of Menu - * @param bFlag set mnemonics on menu items - */ - private JMenuBar createMenuBar(String str, boolean bFlag) { - menubar = new JMenuBar(); - - menu1 = new JMenu(str); - menu1.setMnemonic(str.charAt(0)); - menu1.addActionListener(this); + private JMenuBar createMenuBar() { + JMenuBar menubar = new JMenuBar(); + menu1 = new JMenu("1 - First Menu"); + menu1.setMnemonic('1'); + createSubMenu(menu1, "1 JMenuItem", 8, null); menubar.add(menu1); - for (int i = 0; i < 8; i++) { - JMenuItem menuitem = new JMenuItem("1 JMenuItem" + i); - menuitem.addActionListener(this); - if (bFlag) { - menuitem.setMnemonic('0' + i); - } - menu1.add(menuitem); - } - // second menu menu2 = new JMenu("2 - Second Menu"); - menu2.addActionListener(this); menu2.setMnemonic('2'); - + createSubMenu(menu2, "2 JMenuItem", 4, null); + menu2.add(new JSeparator()); menubar.add(menu2); - for (int i = 0; i < 5; i++) { - JMenuItem menuitem = new JMenuItem("2 JMenuItem" + i); - menuitem.addActionListener(this); - if (bFlag) { - menuitem.setMnemonic('0' + i); - } - menu2.add(menuitem); - } - JMenu submenu = new JMenu("Sub Menu"); + submenu = new JMenu("Sub Menu"); submenu.setMnemonic('S'); - submenu.addActionListener(this); - for (int i = 0; i < 5; i++) { - JMenuItem menuitem = new JMenuItem("S JMenuItem" + i); - menuitem.addActionListener(this); - if (bFlag) { - menuitem.setMnemonic('0' + i); - } - submenu.add(menuitem); - } - menu2.add(new JSeparator()); + createSubMenu(submenu, "S JMenuItem", 4, this); menu2.add(submenu); return menubar; } + private static void createSubMenu(JMenu menu, String prefix, int count, ActionListener action) { + for (int i = 0; i < count; ++i) { + JMenuItem menuitem = new JMenuItem(prefix + i); + menu.add(menuitem); + if (action != null) { + menuitem.addActionListener(action); + } + } + } + + public void actionPerformed(ActionEvent evt) { Object obj = evt.getSource(); if (obj instanceof JMenuItem) { - // put the focus on the noneditable combo. + // put the focus on the non-editable combo. combo1.requestFocus(); } } + private static void hidePopup(Robot robot) { + robot.keyPress(KeyEvent.VK_ESCAPE); + robot.keyRelease(KeyEvent.VK_ESCAPE); + } + public static void main(String[] args) throws Throwable { + GraphicsDevice mainScreen = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice(); + Rectangle mainScreenBounds = mainScreen.getDefaultConfiguration() + .getBounds(); + GraphicsDevice[] screens = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getScreenDevices(); + for (GraphicsDevice screen : screens) { + if (screen == mainScreen) { + continue; + } + + Rectangle bounds = screen.getDefaultConfiguration() + .getBounds(); + if (bounds.x < 0) { + // The test may fail if a screen have negative origin + throw new SkippedException("Configurations with negative screen" + + " origin are not supported"); + } + if (bounds.y >= mainScreenBounds.height) { + // The test may fail if there's a screen to bottom of the main monitor + throw new SkippedException("Configurations with a screen beneath" + + " the main one are not supported"); + } + } try { // Use Robot to automate the test - Robot robot; - robot = new Robot(); + Robot robot = new Robot(); robot.setAutoDelay(50); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - test = new TaskbarPositionTest(); - } - }); + SwingUtilities.invokeAndWait(TaskbarPositionTest::new); robot.waitForIdle(); robot.delay(1000); @@ -310,58 +356,90 @@ // 2 menu with sub menu robot.keyPress(KeyEvent.VK_RIGHT); robot.keyRelease(KeyEvent.VK_RIGHT); - Util.hitMnemonics(robot, KeyEvent.VK_S); + // Open the submenu + robot.keyPress(KeyEvent.VK_S); + robot.keyRelease(KeyEvent.VK_S); robot.waitForIdle(); SwingUtilities.invokeAndWait(() -> isPopupOnScreen(menu2.getPopupMenu(), screenBounds)); + SwingUtilities.invokeAndWait(() -> isPopupOnScreen(submenu.getPopupMenu(), screenBounds)); + // Hit Enter to perform the action of + // a selected menu item in the submenu + // which requests focus on combo1, non-editable combo box robot.keyPress(KeyEvent.VK_ENTER); robot.keyRelease(KeyEvent.VK_ENTER); - // Focus should go to non editable combo box robot.waitForIdle(); - robot.delay(500); + // Focus should go to combo1 + // Open combo1 popup robot.keyPress(KeyEvent.VK_DOWN); + robot.keyRelease(KeyEvent.VK_DOWN); - // How do we check combo boxes? + robot.waitForIdle(); + SwingUtilities.invokeAndWait(() -> isComboPopupOnScreen(combo1)); + hidePopup(robot); - // Editable combo box + // Move focus to combo2, editable combo box robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); + + robot.waitForIdle(); + + // Open combo2 popup robot.keyPress(KeyEvent.VK_DOWN); robot.keyRelease(KeyEvent.VK_DOWN); - // combo1.getUI(); + robot.waitForIdle(); + SwingUtilities.invokeAndWait(() -> isComboPopupOnScreen(combo2)); + hidePopup(robot); - // Popup from Text field + // Move focus to the text field robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); + + robot.waitForIdle(); + + // Open its popup robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_DOWN); robot.keyRelease(KeyEvent.VK_DOWN); robot.keyRelease(KeyEvent.VK_CONTROL); - // Popup from a mouse click. - Point pt = new Point(2, 2); - SwingUtilities.convertPointToScreen(pt, panel); - robot.mouseMove(pt.x, pt.y); - robot.mousePress(InputEvent.BUTTON3_MASK); - robot.mouseRelease(InputEvent.BUTTON3_MASK); + robot.waitForIdle(); + SwingUtilities.invokeAndWait(() -> isPopupOnScreen(popupMenu, fullScreenBounds)); + hidePopup(robot); + // Popup from a mouse click + SwingUtilities.invokeAndWait(() -> { + Point pt = panel.getLocationOnScreen(); + pt.translate(4, 4); + robot.mouseMove(pt.x, pt.y); + }); + robot.mousePress(InputEvent.BUTTON3_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK); + + // Ensure popupMenu is shown within screen bounds robot.waitForIdle(); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - frame.setLocation(-30, 100); - combo1.addPopupMenuListener(new ComboPopupCheckListener()); - combo1.requestFocus(); - } + SwingUtilities.invokeAndWait(() -> isPopupOnScreen(popupMenu, fullScreenBounds)); + hidePopup(robot); + + robot.waitForIdle(); + SwingUtilities.invokeAndWait(() -> { + frame.setLocation(-30, 100); + combo1.requestFocus(); }); + robot.waitForIdle(); + + // Open combo1 popup again robot.keyPress(KeyEvent.VK_DOWN); robot.keyRelease(KeyEvent.VK_DOWN); - robot.keyPress(KeyEvent.VK_ESCAPE); - robot.keyRelease(KeyEvent.VK_ESCAPE); + + robot.waitForIdle(); + SwingUtilities.invokeAndWait(() -> isComboPopupOnScreen(combo1)); + hidePopup(robot); robot.waitForIdle(); } finally { diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/ProgressMonitor/ProgressTest.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/ProgressMonitor/ProgressTest.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/ProgressMonitor/ProgressTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/ProgressMonitor/ProgressTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 6445283 + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @summary Tests if ProgressMonitorInputStream reports progress accurately + * @run main/manual ProgressTest + */ + +import java.io.InputStream; + +import javax.swing.ProgressMonitorInputStream; + +public class ProgressTest { + + private static final String instructionsText = + "A ProgressMonitor will be shown.\n" + + " If it shows blank progressbar after 2048MB bytes read,\n"+ + " press Fail else press Pass"; + + public static void main(String[] args) throws Exception { + + PassFailJFrame pfjFrame = new PassFailJFrame("JScrollPane " + + "Test Instructions", instructionsText, 5); + PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.VERTICAL); + + final long SIZE = (long) (Integer.MAX_VALUE * 1.5); + + InputStream fileIn = new InputStream() { + long read = 0; + + @Override + public int available() { + return (int) Math.min(SIZE - read, Integer.MAX_VALUE); + } + + @Override + public int read() { + return (SIZE - read++ > 0) ? 1 : -1; + } + }; + + ProgressMonitorInputStream pmis = + new ProgressMonitorInputStream(null, "Reading File", fileIn); + + Thread thread = new Thread() { + public void run() { + byte[] buffer = new byte[512]; + int nb = 0; + long total = 0; + while (true) { + try { + nb = pmis.read(buffer); + } catch (Exception e){} + if (nb == 0) break; + total += nb; + + pmis.getProgressMonitor().setNote(total/(1024*1024)+" MB Read"); + } + } + }; + thread.start(); + + pfjFrame.awaitAndCheck(); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/dnd/7171812/bug7171812.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/dnd/7171812/bug7171812.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/dnd/7171812/bug7171812.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/dnd/7171812/bug7171812.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023, 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 @@ -26,26 +26,40 @@ * @key headful * @bug 7171812 * @summary [macosx] Views keep scrolling back to the drag position after DnD - * @author Alexander Zuev * @run main bug7171812 */ -import java.awt.*; -import java.awt.dnd.*; +import java.awt.BorderLayout; +import java.awt.Point; +import java.awt.Robot; +import java.awt.dnd.DnDConstants; +import java.awt.dnd.DropTarget; +import java.awt.dnd.DropTargetDragEvent; +import java.awt.dnd.DropTargetDropEvent; +import java.awt.dnd.DropTargetEvent; +import java.awt.dnd.DropTargetListener; import java.awt.event.InputEvent; -import javax.swing.*; +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; public class bug7171812 { static JFrame mainFrame; static String listData[]; static JListWithScroll list; static JScrollPane scrollPane; + static volatile Point pt; + static volatile int height; /** * @param args the command line arguments */ public static void main(String[] args) throws Exception{ + Robot robot = new Robot(); + robot.setAutoDelay(100); + robot.setAutoWaitForIdle(true); + SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { @@ -53,18 +67,21 @@ } }); - Robot robot = new Robot(); - robot.setAutoDelay(10); robot.waitForIdle(); - robot.mouseMove(scrollPane.getLocationOnScreen().x + 5, scrollPane.getLocationOnScreen().y + 5); - robot.mousePress(InputEvent.BUTTON1_MASK); - for(int offset = 5; offset < scrollPane.getHeight()-20; offset++) { - robot.mouseMove(scrollPane.getLocationOnScreen().x+5, scrollPane.getLocationOnScreen().y+offset); + robot.delay(1000); + SwingUtilities.invokeAndWait(() -> { + pt = scrollPane.getLocationOnScreen(); + height = scrollPane.getHeight(); + }); + robot.mouseMove(pt.x + 5, pt.y + 5); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + for(int offset = 5; offset < height - 20; offset++) { + robot.mouseMove(pt.x + 5, pt.y + offset); } for(int offset = 5; offset < 195; offset++) { - robot.mouseMove(scrollPane.getLocationOnScreen().x+offset, scrollPane.getLocationOnScreen().y+scrollPane.getHeight()-20); + robot.mouseMove(pt.x + offset, pt.y + height - 20); } - robot.mouseRelease(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); try { SwingUtilities.invokeAndWait(new Runnable() { @Override diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/swing/plaf/basic/Test6984643.java openjdk-lts-11.0.22+7/test/jdk/javax/swing/plaf/basic/Test6984643.java --- openjdk-lts-11.0.21+9/test/jdk/javax/swing/plaf/basic/Test6984643.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/swing/plaf/basic/Test6984643.java 2024-01-09 21:19:49.000000000 +0000 @@ -55,7 +55,7 @@ } }); - SwingUtilities.invokeLater(new Runnable() { + SwingUtilities.invokeAndWait(new Runnable() { public void run() { new JFileChooser(); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/javax/xml/crypto/dsig/GenerationTests.java openjdk-lts-11.0.22+7/test/jdk/javax/xml/crypto/dsig/GenerationTests.java --- openjdk-lts-11.0.21+9/test/jdk/javax/xml/crypto/dsig/GenerationTests.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/javax/xml/crypto/dsig/GenerationTests.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023, 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 @@ -30,6 +30,8 @@ * java.base/sun.security.x509 * java.xml.crypto/org.jcp.xml.dsig.internal.dom * jdk.httpserver/com.sun.net.httpserver + * @library /test/lib + * @build jdk.test.lib.Asserts * @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java * X509KeySelector.java GenerationTests.java * @run main/othervm/timeout=300 -Dsun.net.httpserver.nodelay=true GenerationTests @@ -92,6 +94,8 @@ import javax.xml.transform.stream.StreamResult; import org.w3c.dom.*; +import jdk.test.lib.Asserts; + /** * Test that recreates merlin-xmldsig-twenty-three test vectors (and more) * but with different keys and X.509 data. @@ -286,6 +290,7 @@ public static void main(String args[]) throws Exception { setup(); + test_context_iterator(); test_create_signature_enveloped_dsa(1024); test_create_signature_enveloped_dsa(2048); test_create_signature_enveloping_b64_dsa(); @@ -1863,6 +1868,48 @@ return true; } + static boolean test_context_iterator() throws Exception { + System.out.println("Testing context iterator() method."); + + Reference ref = fac.newReference("#object", + fac.newDigestMethod(DigestMethod.SHA512, null)); + SignedInfo si = fac.newSignedInfo(withoutComments, rsaSha512, + Collections.singletonList(ref)); + + Document doc = db.newDocument(); + XMLObject obj = fac.newXMLObject(Collections.singletonList( + new DOMStructure(doc.createTextNode("test text"))), "object", + null, null); + + DOMSignContext dsc = new DOMSignContext(signingKey, doc); + Asserts.assertNotNull(dsc.iterator()); + Asserts.assertFalse(dsc.iterator().hasNext()); + + String namespaceURI = "https://example.com/ns"; + String idAttrValue = "id1"; + String elementQualifiedName = "test:data"; + + Element elm = doc.createElementNS(namespaceURI, elementQualifiedName); + elm.setAttributeNS(namespaceURI, "test:id", idAttrValue); + dsc.setIdAttributeNS(elm, namespaceURI, "id"); + + Iterator> iter = dsc.iterator(); + Asserts.assertTrue(dsc.iterator().hasNext()); + + Map.Entry element = iter.next(); + Asserts.assertEquals(element.getKey(), idAttrValue); + Asserts.assertEquals(element.getValue().getNodeName(), elementQualifiedName); + + try { + iter.remove(); + throw new RuntimeException( + "The expected UnsupportedOperationException was not thrown."); + } catch (UnsupportedOperationException exc) { + // this is expected + } + return true; + } + private static Key[] getCachedKeys(String signatureMethod) { return cachedKeys.computeIfAbsent(signatureMethod, sm -> { try { diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/gc/detailed/PromotionFailedEvent.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/gc/detailed/PromotionFailedEvent.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/gc/detailed/PromotionFailedEvent.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/gc/detailed/PromotionFailedEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -51,12 +51,16 @@ // This test can not always trigger the expected event. // Test is ok even if no events found. List events = RecordingFile.readAllEvents(Paths.get(jfr_file)); + int minObjectAlignment = 8; for (RecordedEvent event : events) { System.out.println("Event: " + event); long smallestSize = Events.assertField(event, "promotionFailed.smallestSize").atLeast(1L).getValue(); + Asserts.assertTrue((smallestSize % minObjectAlignment) == 0, "smallestSize " + smallestSize + " is not a valid size."); long firstSize = Events.assertField(event, "promotionFailed.firstSize").atLeast(smallestSize).getValue(); + Asserts.assertTrue((firstSize % minObjectAlignment) == 0, "firstSize " + firstSize + " is not a valid size."); long totalSize = Events.assertField(event, "promotionFailed.totalSize").atLeast(firstSize).getValue(); long objectCount = Events.assertField(event, "promotionFailed.objectCount").atLeast(1L).getValue(); + Asserts.assertTrue((totalSize % minObjectAlignment) == 0, "totalSize " + totalSize + " is not a valid size."); Asserts.assertLessThanOrEqual(smallestSize * objectCount, totalSize, "smallestSize * objectCount <= totalSize"); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -62,13 +62,17 @@ } List events = RecordingFile.readAllEvents(Paths.get(JFR_FILE)); + int minObjectAlignment = 8; Events.hasEvents(events); for (RecordedEvent event : events) { long objectCount = Events.assertField(event, "evacuationFailed.objectCount").atLeast(1L).getValue(); long smallestSize = Events.assertField(event, "evacuationFailed.smallestSize").atLeast(1L).getValue(); + Asserts.assertTrue((smallestSize % minObjectAlignment) == 0, "smallestSize " + smallestSize + " is not a valid size."); long firstSize = Events.assertField(event, "evacuationFailed.firstSize").atLeast(smallestSize).getValue(); + Asserts.assertTrue((firstSize % minObjectAlignment) == 0, "firstSize " + firstSize + " is not a valid size."); long totalSize = Events.assertField(event, "evacuationFailed.totalSize").atLeast(firstSize).getValue(); + Asserts.assertTrue((totalSize % minObjectAlignment) == 0, "totalSize " + totalSize + " is not a valid size."); Asserts.assertLessThanOrEqual(smallestSize * objectCount, totalSize, "smallestSize * objectCount <= totalSize"); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/metadata/TestDefaultConfigurations.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/metadata/TestDefaultConfigurations.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/metadata/TestDefaultConfigurations.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/metadata/TestDefaultConfigurations.java 2024-01-09 21:19:49.000000000 +0000 @@ -174,6 +174,7 @@ insertSetting(doc, EventNames.JavaExceptionThrow, "threshold", "0 ns"); insertSetting(doc, EventNames.JavaErrorThrow, "threshold", "0 ns"); insertSetting(doc, EventNames.SecurityProperty, "threshold", "0 ns"); + insertSetting(doc, EventNames.SecurityProviderService, "threshold", "0 ns"); insertSetting(doc, EventNames.TLSHandshake, "threshold", "0 ns"); insertSetting(doc, EventNames.X509Certificate, "threshold", "0 ns"); insertSetting(doc, EventNames.X509Validation, "threshold", "0 ns"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/runtime/TestActiveSettingEvent.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/runtime/TestActiveSettingEvent.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/runtime/TestActiveSettingEvent.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/runtime/TestActiveSettingEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -206,6 +206,7 @@ settingValues.put(EventNames.X509Certificate + "#threshold", "0 ns"); settingValues.put(EventNames.X509Validation + "#threshold", "0 ns"); settingValues.put(EventNames.Deserialization + "#threshold", "0 ns"); + settingValues.put(EventNames.SecurityProviderService + "#threshold", "0 ns"); try (Recording recording = new Recording(c)) { Map eventTypes = new HashMap<>(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/security/TestSecurityProviderServiceEvent.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/security/TestSecurityProviderServiceEvent.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/event/security/TestSecurityProviderServiceEvent.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/event/security/TestSecurityProviderServiceEvent.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.jfr.event.security; + +import java.security.*; +import java.security.cert.CertPathBuilder; +import java.util.Collections; +import java.util.List; +import java.util.function.*; + +import jdk.jfr.Recording; +import jdk.jfr.consumer.RecordedEvent; +import jdk.test.lib.Asserts; +import jdk.test.lib.jfr.Events; +import jdk.test.lib.jfr.EventNames; + +import javax.crypto.Cipher; +import javax.crypto.NoSuchPaddingException; + +/* + * @test + * @bug 8254711 + * @summary Add JFR events for security crypto algorithms + * @key jfr + * @requires vm.hasJFR + * @library /test/lib + * @modules jdk.jfr/jdk.jfr.events + * @run main/othervm jdk.jfr.event.security.TestSecurityProviderServiceEvent + */ +public class TestSecurityProviderServiceEvent { + + public static void main(String[] args) throws Exception { + testAlg(cipherFunc, "AES", "SunJCE", + "SunEC", "Cipher", 1, Collections.emptyList()); + testAlg(signatureFunc, "SHA256withRSA", "SunRsaSign", + "SunEC", "Signature", 2, List.of("MessageDigest")); + testAlg(messageDigestFunc, "SHA-512", "SUN", + "SunEC", "MessageDigest", 1, Collections.emptyList()); + testAlg(keystoreFunc, "PKCS12", "SUN", + "SunEC", "KeyStore", 1, Collections.emptyList()); + testAlg(certPathBuilderFunc, "PKIX", "SUN", + "SunEC", "CertPathBuilder", 2, List.of("CertificateFactory")); + } + + private static void testAlg(BiFunction bif, String alg, + String workingProv, String brokenProv, String algType, + int expected, List other) throws Exception { + // bootstrap security Provider services + Provider p = bif.apply(alg, workingProv); + + try (Recording recording = new Recording()) { + recording.enable(EventNames.SecurityProviderService); + recording.start(); + p = bif.apply(alg, workingProv); + bif.apply(alg, brokenProv); + recording.stop(); + List events = Events.fromRecording(recording); + Asserts.assertEquals(events.size(), expected, "Incorrect number of events"); + assertEvent(events, algType, alg, p.getName(), other); + } + } + + private static BiFunction cipherFunc = (s1, p1 ) -> { + Cipher c; + try { + c = Cipher.getInstance(s1, p1); + return c.getProvider(); + } catch (NoSuchAlgorithmException | NoSuchPaddingException | NoSuchProviderException e) { + // expected + } + return null; + }; + + private static BiFunction signatureFunc = (s1, p1 ) -> { + Signature s; + try { + s = Signature.getInstance(s1, p1); + return s.getProvider(); + } catch (NoSuchAlgorithmException | NoSuchProviderException e) { + // expected + } + return null; + }; + + private static BiFunction messageDigestFunc = (s1, p1 ) -> { + MessageDigest md; + try { + md = MessageDigest.getInstance(s1, p1); + return md.getProvider(); + } catch (NoSuchAlgorithmException | NoSuchProviderException e) { + // expected + } + return null; + }; + + private static BiFunction keystoreFunc = (s1, p1 ) -> { + KeyStore ks; + try { + ks = KeyStore.getInstance(s1, p1); + return ks.getProvider(); + } catch (NoSuchProviderException | KeyStoreException e) { + // expected + } + return null; + }; + + private static BiFunction certPathBuilderFunc = (s1, p1 ) -> { + CertPathBuilder cps; + try { + cps = CertPathBuilder.getInstance(s1, p1); + return cps.getProvider(); + } catch (NoSuchProviderException | NoSuchAlgorithmException e) { + // expected + } + return null; + }; + + private static void assertEvent(List events, String type, + String alg, String workingProv, List other) { + boolean secondaryEventOK = other.isEmpty() ? true : false; + for (RecordedEvent e : events) { + if (other.contains(e.getValue("type"))) { + // secondary operation in service stack while constructing this request + secondaryEventOK = true; + continue; + } + Events.assertField(e, "provider").equal(workingProv); + Events.assertField(e, "type").equal(type); + Events.assertField(e, "algorithm").equal(alg); + } + if (!secondaryEventOK) { + throw new RuntimeException("Secondary events missing"); + } + + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, 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 @@ -95,6 +95,7 @@ "-Xmx64m", "-XX:-TransmitErrorReport", "-XX:-CreateCoredumpOnCrash", + "-XX:-TieredCompilation", // Avoid secondary crashes (see JDK-8293166) "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-XX:StartFlightRecording=" + flightRecordingOptions, crasher, diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/startupargs/TestOptionsWithLocale.java openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/startupargs/TestOptionsWithLocale.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/jfr/startupargs/TestOptionsWithLocale.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/jfr/startupargs/TestOptionsWithLocale.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,40 @@ +package jdk.jfr.startupargs; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.Calendar; +import java.util.GregorianCalendar; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +/** + * @test + * @summary Checks that locale is respected when using -XX:FlightRecorderOptions + * See JDK-8244508 + * @key jfr + * @requires vm.hasJFR + * @modules jdk.jfr + * @library /test/lib + * @run main jdk.jfr.startupargs.TestOptionsWithLocale + */ +public class TestOptionsWithLocale { + + public static class PrintDate { + public static void main(String... args) { + GregorianCalendar date = new GregorianCalendar(2020, Calendar.JANUARY, 1); + DateFormat formatter = DateFormat.getDateTimeInstance(); + System.out.println(formatter.format(date.getTime())); + } + } + + public static void main(String... args) throws IOException { + ProcessBuilder pb = ProcessTools.createTestJvm( + "-Duser.country=DE", + "-Duser.language=de", + "-XX:FlightRecorderOptions:stackdepth=128", + PrintDate.class.getName()); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("01.01.2020, 00:00:00"); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/net/Sockets/QuickAckTest.java openjdk-lts-11.0.22+7/test/jdk/jdk/net/Sockets/QuickAckTest.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/net/Sockets/QuickAckTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/net/Sockets/QuickAckTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, 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 @@ -30,6 +30,7 @@ */ import java.io.IOException; import java.net.DatagramSocket; +import java.net.InetAddress; import java.net.MulticastSocket; import java.net.ServerSocket; import java.net.Socket; @@ -38,12 +39,10 @@ public class QuickAckTest { - private static final String LOCAL_HOST = "127.0.0.1"; - public static void main(String args[]) throws IOException { try (ServerSocket ss = new ServerSocket(0); - Socket s = new Socket(LOCAL_HOST, ss.getLocalPort()); + Socket s = new Socket(InetAddress.getLoopbackAddress(), ss.getLocalPort()); DatagramSocket ds = new DatagramSocket(0); MulticastSocket mc = new MulticastSocket(0)) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/net/Sockets/Test.java openjdk-lts-11.0.22+7/test/jdk/jdk/net/Sockets/Test.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/net/Sockets/Test.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/net/Sockets/Test.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -79,14 +79,14 @@ DatagramSocket dg = new DatagramSocket(0)) { int tcp_port = ss.getLocalPort(); - final InetAddress loop = InetAddress.getByName("127.0.0.1"); + final InetAddress loop = InetAddress.getLoopbackAddress(); final InetSocketAddress loopad = new InetSocketAddress(loop, tcp_port); final int udp_port = dg.getLocalPort(); - final Socket s = new Socket("127.0.0.1", tcp_port); + final Socket s = new Socket(loop, tcp_port); final SocketChannel sc = SocketChannel.open(); - sc.connect(new InetSocketAddress("127.0.0.1", tcp_port)); + sc.connect(new InetSocketAddress(loop, tcp_port)); doTest("Sockets.setOption Socket", () -> { out.println(flowIn); diff -Nru openjdk-lts-11.0.21+9/test/jdk/jdk/security/jarsigner/JarWithOneNonDisabledDigestAlg.java openjdk-lts-11.0.22+7/test/jdk/jdk/security/jarsigner/JarWithOneNonDisabledDigestAlg.java --- openjdk-lts-11.0.21+9/test/jdk/jdk/security/jarsigner/JarWithOneNonDisabledDigestAlg.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/jdk/security/jarsigner/JarWithOneNonDisabledDigestAlg.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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 @@ -27,6 +27,7 @@ * @summary Check that jar entry with at least one non-disabled digest * algorithm in manifest is treated as signed * @modules java.base/sun.security.tools.keytool + * @modules java.base/sun.security.util * @library /test/lib * @build jdk.test.lib.util.JarUtils * jdk.test.lib.security.SecurityUtils @@ -34,61 +35,94 @@ */ import java.io.InputStream; -import java.io.FileInputStream; -import java.io.FileOutputStream; +import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.security.CodeSigner; import java.security.KeyStore; +import java.security.cert.CertPathValidatorException; +import java.util.Collections; +import java.util.Date; import java.util.Enumeration; -import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.zip.ZipFile; import jdk.security.jarsigner.JarSigner; import jdk.test.lib.util.JarUtils; -import jdk.test.lib.security.SecurityUtils; +import sun.security.util.ConstraintsParameters; +import sun.security.util.DisabledAlgorithmConstraints; +import sun.security.util.JarConstraintsParameters; public class JarWithOneNonDisabledDigestAlg { private static final String PASS = "changeit"; - private static final String TESTFILE1 = "testfile1"; - private static final String TESTFILE2 = "testfile2"; + private static final Path TESTFILE1 = Path.of("testfile1"); + private static final Path TESTFILE2 = Path.of("testfile2"); + private static final Path UNSIGNED_JAR = Path.of("unsigned.jar"); + private static final Path SIGNED_JAR = Path.of("signed.jar"); + private static final Path SIGNED_TWICE_JAR = Path.of("signed2.jar"); + private static final Path MULTI_SIGNED_JAR = Path.of("multi-signed.jar"); + private static final Path CURRENT_DIR = Path.of("."); public static void main(String[] args) throws Exception { - SecurityUtils.removeFromDisabledAlgs("jdk.jar.disabledAlgorithms", - List.of("SHA1")); - Files.write(Path.of(TESTFILE1), TESTFILE1.getBytes()); - JarUtils.createJarFile(Path.of("unsigned.jar"), Path.of("."), - Path.of(TESTFILE1)); + // Sanity check: Assert that MD5 is disabled, SHA-256 enabled + checkDigestAlgorithmPermits(); - genkeypair("-alias SHA1 -sigalg SHA1withRSA"); - genkeypair("-alias SHA256 -sigalg SHA256withRSA"); - - KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); - try (FileInputStream fis = new FileInputStream("keystore")) { - ks.load(fis, PASS.toCharArray()); - } + // Create an unsigned JAR with a single file + Files.write(TESTFILE1, TESTFILE1.toString().getBytes()); + JarUtils.createJarFile(UNSIGNED_JAR, CURRENT_DIR, TESTFILE1); + + // Generate a keystore with two different signers + genkeypair("-alias SIGNER1"); + genkeypair("-alias SIGNER2"); + KeyStore ks = loadKeyStore(); // Sign JAR twice with same signer but different digest algorithms // so that each entry in manifest file contains two digest values. - signJarFile(ks, "SHA1", "MD5", "unsigned.jar", "signed.jar"); - signJarFile(ks, "SHA1", "SHA1", "signed.jar", "signed2.jar"); - checkThatJarIsSigned("signed2.jar", false); + // Note that MD5 is a disabled digest algorithm, while SHA-256 is not + signJarFile(ks, "SIGNER1", "MD5", UNSIGNED_JAR, SIGNED_JAR); + signJarFile(ks, "SIGNER1", "SHA256", SIGNED_JAR, SIGNED_TWICE_JAR); + checkThatJarIsSigned(SIGNED_TWICE_JAR, Map.of(TESTFILE1.toString(), 1)); // add another file to the JAR - Files.write(Path.of(TESTFILE2), "testFile2".getBytes()); - JarUtils.updateJarFile(Path.of("signed2.jar"), Path.of("."), - Path.of(TESTFILE2)); - - // Sign again with different signer (SHA256) and SHA-1 digestalg. - // TESTFILE1 should have two signers and TESTFILE2 should have one - // signer. - signJarFile(ks, "SHA256", "SHA1", "signed2.jar", "multi-signed.jar"); + Files.write(TESTFILE2, TESTFILE2.toString().getBytes()); + JarUtils.updateJarFile(SIGNED_TWICE_JAR, CURRENT_DIR, TESTFILE2); + + // Sign the updated JAR, now with a different signer and with an enabled digest alg + signJarFile(ks, "SIGNER2", "SHA256", SIGNED_TWICE_JAR, MULTI_SIGNED_JAR); - checkThatJarIsSigned("multi-signed.jar", true); + // TESTFILE1 should have two signers and TESTFILE2 should have one signer. + checkThatJarIsSigned(MULTI_SIGNED_JAR, + Map.of(TESTFILE1.toString(), 2, + TESTFILE2.toString(), 1) + ); + } + + private static void checkDigestAlgorithmPermits() throws Exception { + ConstraintsParameters cp = new JarConstraintsParameters(Collections.emptyList(), new Date()); + DisabledAlgorithmConstraints jarConstraints = DisabledAlgorithmConstraints.jarConstraints(); + try { + jarConstraints.permits("MD5", cp, false); + throw new Exception("This test assumes that MD5 is disabled"); + } catch (CertPathValidatorException e) { + // Ignore + } + try { + jarConstraints.permits("SHA256", cp, false); + } catch (CertPathValidatorException e) { + throw new Exception("This test assumes that SHA256 is enabled"); + } + } + + private static KeyStore loadKeyStore() throws Exception { + KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); + try (InputStream fis = Files.newInputStream(Path.of("keystore"))) { + ks.load(fis, PASS.toCharArray()); + } + return ks; } private static KeyStore.PrivateKeyEntry getEntry(KeyStore ks, String alias) @@ -101,12 +135,13 @@ private static void genkeypair(String cmd) throws Exception { cmd = "-genkeypair -keystore keystore -storepass " + PASS + - " -keypass " + PASS + " -keyalg rsa -dname CN=Duke " + cmd; + " -keypass " + PASS + " -keyalg rsa -sigalg SHA256withRSA " + + "-dname CN=Duke " + cmd; sun.security.tools.keytool.Main.main(cmd.split(" ")); } private static void signJarFile(KeyStore ks, String alias, - String digestAlg, String inputFile, String outputFile) + String digestAlg, Path inputFile, Path outputFile) throws Exception { JarSigner signer = new JarSigner.Builder(getEntry(ks, alias)) @@ -114,38 +149,36 @@ .signerName(alias) .build(); - try (ZipFile in = new ZipFile(inputFile); - FileOutputStream out = new FileOutputStream(outputFile)) { + try (ZipFile in = new ZipFile(inputFile.toFile()); + OutputStream out = Files.newOutputStream(outputFile)) { signer.sign(in, out); } } - private static void checkThatJarIsSigned(String jarFile, boolean multi) + private static void checkThatJarIsSigned(Path jarFile, Map expected) throws Exception { - try (JarFile jf = new JarFile(jarFile, true)) { + try (JarFile jf = new JarFile(jarFile.toFile(), true)) { Enumeration entries = jf.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); if (entry.isDirectory() || isSigningRelated(entry.getName())) { continue; } - InputStream is = jf.getInputStream(entry); - while (is.read() != -1); + try (InputStream is = jf.getInputStream(entry)) { + is.transferTo(OutputStream.nullOutputStream()); + } CodeSigner[] signers = entry.getCodeSigners(); - if (signers == null) { - throw new Exception("JarEntry " + entry.getName() + - " is not signed"); - } else if (multi) { - if (entry.getName().equals(TESTFILE1) && - signers.length != 2) { - throw new Exception("Unexpected number of signers " + - "for " + entry.getName() + ": " + signers.length); - } else if (entry.getName().equals(TESTFILE2) && - signers.length != 1) { - throw new Exception("Unexpected number of signers " + - "for " + entry.getName() + ": " + signers.length); - } + if (!expected.containsKey(entry.getName())) { + throw new Exception("Unexpected entry " + entry.getName()); + } + int expectedSigners = expected.get(entry.getName()); + int actualSigners = signers == null ? 0 : signers.length; + + if (expectedSigners != actualSigners) { + throw new Exception("Unexpected number of signers " + + "for " + entry.getName() + ": " + actualSigners + + ", expected " + expectedSigners); } } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -/* - * Copyright (c) 2017, 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* - * @test - * @bug 8189131 - * @summary Interoperability tests with Actalis CA - * @build ValidatePathWithParams - * @run main/othervm/timeout=180 -Djava.security.debug=certpath ActalisCA OCSP - * @run main/othervm/timeout=180 -Djava.security.debug=certpath ActalisCA CRL - */ - - /* - * Obtain test artifacts for Actalis CA from: - * - * Test website with *active* TLS Server certificate: - * https://ssltest-active.actalis.it/ - * - * Test website with *revoked* TLS Server certificate: - * https://ssltest-revoked.actalis.it/ - * - * Test website with *expired* TLS Server certificate: - * https://ssltest-expired.actalis.it/ - */ -public class ActalisCA { - - // Owner: CN=Actalis Organization Validated Server CA G3, O=Actalis S.p.A., - // L=Ponte San Pietro, ST=Bergamo, C=IT - // Issuer: CN=Actalis Authentication Root CA, O=Actalis S.p.A ./03358520967, - // L=Milan, C=IT - // Serial number: 5c3b3f37adfc28fe0fcfd3abf83f8551 - // Valid from: Mon Jul 06 00:20:55 PDT 2020 until: Sun Sep 22 04:22:02 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIHdTCCBV2gAwIBAgIQXDs/N638KP4Pz9Or+D+FUTANBgkqhkiG9w0BAQsFADBr\n" + - "MQswCQYDVQQGEwJJVDEOMAwGA1UEBwwFTWlsYW4xIzAhBgNVBAoMGkFjdGFsaXMg\n" + - "Uy5wLkEuLzAzMzU4NTIwOTY3MScwJQYDVQQDDB5BY3RhbGlzIEF1dGhlbnRpY2F0\n" + - "aW9uIFJvb3QgQ0EwHhcNMjAwNzA2MDcyMDU1WhcNMzAwOTIyMTEyMjAyWjCBiTEL\n" + - "MAkGA1UEBhMCSVQxEDAOBgNVBAgMB0JlcmdhbW8xGTAXBgNVBAcMEFBvbnRlIFNh\n" + - "biBQaWV0cm8xFzAVBgNVBAoMDkFjdGFsaXMgUy5wLkEuMTQwMgYDVQQDDCtBY3Rh\n" + - "bGlzIE9yZ2FuaXphdGlvbiBWYWxpZGF0ZWQgU2VydmVyIENBIEczMIICIjANBgkq\n" + - "hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAs73Ch+t2owm3ayTkyqy0OPuCTiybxTyS\n" + - "4cU4y0t2RGSwCNjLh/rcutO0yoriZxVtPrNMcIRQ544BQhHFt/ypW7e+t8wWKrHa\n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89ig3smV/HaN8tO0lfTpvm7Zvzd5TkMs=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=ssltest-active.actalis.it, O=Actalis S.p.A., L=Ponte San Pietro, - // ST=Bergamo, C=IT - // Issuer: CN=Actalis Organization Validated Server CA G3, O=Actalis S.p A., - // L=Ponte San Pietro, ST=Bergamo, C=IT - // Serial number: 4a49e2afcd448af3b7f5f14e1cd5954 - // Valid from: Tue Mar 08 08:00:57 PST 2022 until: Wed Mar 08 08:00:57 PST 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIH0jCCBbqgAwIBAgIQBKSeKvzUSK87f18U4c1ZVDANBgkqhkiG9w0BAQsFADCB\n" + - "iTELMAkGA1UEBhMCSVQxEDAOBgNVBAgMB0JlcmdhbW8xGTAXBgNVBAcMEFBvbnRl\n" + - "IFNhbiBQaWV0cm8xFzAVBgNVBAoMDkFjdGFsaXMgUy5wLkEuMTQwMgYDVQQDDCtB\n" + - "Y3RhbGlzIE9yZ2FuaXphdGlvbiBWYWxpZGF0ZWQgU2VydmVyIENBIEczMB4XDTIy\n" + - "MDMwODE2MDA1N1oXDTIzMDMwODE2MDA1N1owdzELMAkGA1UEBhMCSVQxEDAOBgNV\n" + - "BAgMB0JlcmdhbW8xGTAXBgNVBAcMEFBvbnRlIFNhbiBQaWV0cm8xFzAVBgNVBAoM\n" + - "DkFjdGFsaXMgUy5wLkEuMSIwIAYDVQQDDBlzc2x0ZXN0LWFjdGl2ZS5hY3RhbGlz\n" + - "Lml0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsJnlOatNNth7gfqZ\n" + - "WN8HMfp9qlkDf/YW8ReNXyTtqFEy2xZrVVmAV2XIqL1lJDYJz86mdVsz3AqIMTzo\n" + - "GxPlmn/oEnF0YeRYQ1coKRdwP7hWSwqyMMhh+C7r5zMA9gQQVXV5wWR5U+bgvt23\n" + - "Y/55DOqk3Fp5Odt6Lyu6xA45MwHrj2Gr/nMK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3C/NptVyZgT8bL4XT5ITrAjwPciBj0yxYzUkrLZO1wKQSQ=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=ssltest-revoked.actalis.it, O=Actalis S.p.A., L=Ponte San Pietro, ST=Bergamo, C=IT - // Issuer: CN=Actalis Organization Validated Server CA G3, O=Actalis S.p.A., - // L=Ponte San Pietro, ST=Bergamo, C=IT - // Serial number: 320955171b78d49507508910da2c5bc4 - // Valid from: Tue Sep 27 03:40:43 PDT 2022 until: Wed Sep 27 03:40:43 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIH1TCCBb2gAwIBAgIQMglVFxt41JUHUIkQ2ixbxDANBgkqhkiG9w0BAQsFADCB\n" + - "iTELMAkGA1UEBhMCSVQxEDAOBgNVBAgMB0JlcmdhbW8xGTAXBgNVBAcMEFBvbnRl\n" + - "IFNhbiBQaWV0cm8xFzAVBgNVBAoMDkFjdGFsaXMgUy5wLkEuMTQwMgYDVQQDDCtB\n" + - "Y3RhbGlzIE9yZ2FuaXphdGlvbiBWYWxpZGF0ZWQgU2VydmVyIENBIEczMB4XDTIy\n" + - "MDkyNzEwNDA0M1oXDTIzMDkyNzEwNDA0M1oweDELMAkGA1UEBhMCSVQxEDAOBgNV\n" + - "BAgMB0JlcmdhbW8xGTAXBgNVBAcMEFBvbnRlIFNhbiBQaWV0cm8xFzAVBgNVBAoM\n" + - "DkFjdGFsaXMgUy5wLkEuMSMwIQYDVQQDDBpzc2x0ZXN0LXJldm9rZWQuYWN0YWxp\n" + - "cy5pdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKdBnbeFtw/Ejp1U\n" + - "gr86BQ5rqgGXWWXb7fsOhPb5On9RXTojg6oaeIV4GxHsMZhEDKQdcZ6JWAo2dbtp\n" + - "/7ereFEDWG/YJahLHFZ/ihXG4AmfObYEhoGbKitW75fOs/aWC7Veck/sXsw7cjLW\n" + - "GY623ybcF9DBExg3S4uLRaSkv5hXUDu/Czph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+ - "Q3kD9KRyfZ9Kk05Glf3DsZMWvp1N2ZZWaU2Ms5U3ijUheCiBrqrs8a8=\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Sep 27 03:52:40 PDT 2022", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,613 +0,0 @@ -/* - * Copyright (c) 2019, 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8233223 - * @summary Interoperability tests with Amazon's CA1, CA2, CA3, and CA4 - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath AmazonCA OCSP - * @run main/othervm -Djava.security.debug=certpath AmazonCA CRL - */ - -/* - * Obtain TLS test artifacts for Amazon CAs from: - * - * Amazon Root CA 1 - * Valid - https://good.sca1a.amazontrust.com/ - * Revoked - https://revoked.sca1a.amazontrust.com/ - * Amazon Root CA 2 - * Valid - https://good.sca2a.amazontrust.com/ - * Revoked - https://revoked.sca2a.amazontrust.com/ - * Amazon Root CA 3 - * Valid - https://good.sca3a.amazontrust.com/ - * Revoked - https://revoked.sca3a.amazontrust.com/ - * Amazon Root CA 4 - * Valid - https://good.sca4a.amazontrust.com/ - * Revoked - https://revoked.sca4a.amazontrust.com/ - */ -public class AmazonCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new AmazonCA_1().runTest(pathValidator); - new AmazonCA_2().runTest(pathValidator); - new AmazonCA_3().runTest(pathValidator); - new AmazonCA_4().runTest(pathValidator); - } -} - -class AmazonCA_1 { - - // Owner: CN=Amazon RSA 2048 M02, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 1, O=Amazon, C=US - // Serial number: 773124a4bcbd44ec7b53beaf194842d3a0fa1 - // Valid from: Tue Aug 23 15:25:30 PDT 2022 until: Fri Aug 23 15:25:30 PDT 2030 - private static final String INT_VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEXjCCA0agAwIBAgITB3MSSkvL1E7HtTvq8ZSELToPoTANBgkqhkiG9w0BAQsF\n" + - "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQD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EuY3JsMBMGA1UdIAQMMAowCAYGZ4EMAQIBMA0GCSqGSIb3DQEBCwUAA4IB\n" + - "AQAtTi6Fs0Azfi+iwm7jrz+CSxHH+uHl7Law3MQSXVtR8RV53PtR6r/6gNpqlzdo\n" + - "Zq4FKbADi1v9Bun8RY8D51uedRfjsbeodizeBB8nXmeyD33Ep7VATj4ozcd31YFV\n" + - "fgRhvTSxNrrTlNpWkUk0m3BMPv8sg381HhA6uEYokE5q9uws/3YkKqRiEz3TsaWm\n" + - "JqIRZhMbgAfp7O7FUwFIb7UIspogZSKxPIWJpxiPo3TcBambbVtQOcNRWz5qCQdD\n" + - "slI2yayq0n2TXoHyNCLEH8rpsJRVILFsg0jc7BaFrMnF462+ajSehgj12IidNeRN\n" + - "4zl+EoNaWdpnWndvSpAEkq2P\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=Amazon RSA 2048 M01, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 1, O=Amazon, C=US - // Serial number: 77312380b9d6688a33b1ed9bf9ccda68e0e0f - // Valid from: Tue Aug 23 15:21:28 PDT 2022 until: Fri Aug 23 15:21:28 PDT 2030 - private static final String INT_REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIEXjCCA0agAwIBAgITB3MSOAudZoijOx7Zv5zNpo4ODzANBgkqhkiG9w0BAQsF\n" + - "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n" + - "b24gUm9vdCBDQSAxMB4XDTIyMDgyMzIyMjEyOFoXDTMwMDgyMzIyMjEyOFowPDEL\n" + - "MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEcMBoGA1UEAxMTQW1hem9uIFJT\n" + - "QSAyMDQ4IE0wMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOtxLKnL\n" + - "H4gokjIwr4pXD3i3NyWVVYesZ1yX0yLI2qIUZ2t88Gfa4gMqs1YSXca1R/lnCKeT\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KHvyoQGi1C0ClymHETx/chhQGDyYSWqB/THwnN15AwLQo0E5V9E\n" + - "SJlbe4mBlqeInUsNYugExNf+tOiybcrswBy8OFsd34XOW3rjSUtsuafd9AWySa3h\n" + - "xRRrwszrzX/WWGm6wyB+f7C4\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.rootca1.demo.amazontrust.com - // Issuer: CN=Amazon RSA 2048 M02, O=Amazon, C=US - // Serial number: 60c6e837b2e7586d8464eb34f4a85fe - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIGKDCCBRCgAwIBAgIQBgxug3sudYbYRk6zT0qF/jANBgkqhkiG9w0BAQsFADA8\n" + - "MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQQDExNBbWF6b24g\n" + - "UlNBIDIwNDggTTAyMB4XDTIzMDUxMDAwMDAwMFoXDTI0MDYwNzIzNTk1OVowLTEr\n" + - "MCkGA1UEAxMidmFsaWQucm9vdGNhMS5kZW1vLmFtYXpvbnRydXN0LmNvbTCCASIw\n" + - "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3hA+omhUcO8nYO8/+dkpbYz8WI\n" + - "1ms7Y7JA2pPFfp2N/aWcf6m5ORm1BkyGLOttjTu318Qpa9eahQ1Pi3RNe3BtqjD9\n" + - "jcHncpwAFMsXy1beZA7sZ7AA4vKltA3t6yrU5ruTLUGQwUndeIBBSTW5QpdT9I/p\n" + - "EM7d+Miwre63kofbJ1lVPAJvN/udMVqGWNF8V5qscklUUHoSKA3FWWsiCyIgnthg\n" + - "G3u6R1KH66Qionp0ho/ttvrBCI0C/bdrdH+wybFv8oFFvAW2U9xn2Azt47/2kHHm\n" + - "tTRjrgufhDbcz/MLR6hwBXAJuwVvJZmSqe7B4IILFexu6wjxZfyqVm2FMr8CAwEA\n" + - "AaOCAzMwggMvMB8GA1UdIwQYMBa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EUCIGN6cT+6uwDospXe\n" + - "gMa8b38oXouXUT66X2gOiJ0SoRyQAiEAjDMu2vEll5tRpUvU8cD4gR2xV4hqoDxx\n" + - "Q+QGW+PvJxcwDQYJKoZIhvcNAQELBQADggEBACtxC3LlQvULeI3lt7ZYFSWndEhm\n" + - "tNUotoeKSXJXdoIpqSr10bzMPX9SHvemgOUtzP3JNqWPHw1uW9YFyeDE6yWj/B13\n" + - "Xj1hv1cqYIwyaOZBerU/9PT5PaCn20AC9DHbc7iBv+zs+DYiqlAFJ1GVaprwLul4\n" + - "8wp3gnC3Hjb8NykydCo6vw0AJ2UzjpjiTyVZ93jITzLOiboOUa1gQGnojzWlYaet\n" + - "sXe+RDylBp/Wuj1ZS7v/etltzYm5GanPi4y/p7Ta3Uky6std/GM6XbPRdBEFboFR\n" + - "B2IP0divd9c74Q+tLgpsAz5yXm9LtYPMcEPC2YRN2PgBg67c5+A7eIOluuw=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.rootca1.demo.amazontrust.com - // Issuer: CN=Amazon RSA 2048 M01, O=Amazon, C=US - // Serial number: e1023665b1268d788cc25bf69a9d05e - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIGMjCCBRqgAwIBAgIQDhAjZlsSaNeIzCW/aanQXjANBgkqhkiG9w0BAQsFADA8\n" + - "MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQQDExNBbWF6b24g\n" + - "UlNBIDIwNDggTTAxMB4XDTIzMDUxMDAwMDAwMFoXDTI0MDYwNzIzNTk1OVowLzEt\n" + - "MCsGA1UEAxMkcmV2b2tlZC5yb290Y2ExLmRlbW8uYW1hem9udHJ1c3QuY29tMIIB\n" + - "IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSPd1PWACxZohFCAJT1JWuXK\n" + - "GY29wZZ9yY0zoi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EftZsAAAGIB72TggAABAMARzBFAiAZ\n" + - "naLbRHRuaRrE304GSuWX/79MU/e+SSlr0cNJ0kNNaAIhAPnz9HayL4txhkTEZiMs\n" + - "nttNnNqD17I0J17JLVOF4i/4AHYASLDja9qmRzQP5WoC+p0w6xxSActW3SyB2bu/\n" + - "qznYhHMAAAGIB72TmwAABAMARzBFAiEAgEqT7CYGQ/u36/3YcxBH78QfknI9kgcY\n" + - "sgJLkurUF6cCIFZZ/b803+ek6o+bmdV/uVx2UlskAyyolZ2okBAb6IscAHYA2ra/\n" + - "az+1tiKfm8K7XGvocJFxbLtRhIU0vaQ9MEjX+6sAAAGIB72TbQAABAMARzBFAiEA\n" + - "6z2RSoK263hvYF71rj1d0TpC70/6zagSRR4glHOT6IACICYvaMAnrCNSTSiZ20Wz\n" + - "Ju5roTippO3BWKhQYrTKZuu4MA0GCSqGSIb3DQEBCwUAA4IBAQB4S1JGulFpMIaP\n" + - "NtLUJmjWz8eexQdWLDVF+H8dd6xpZgpiYtig/Ynphzuk1IIF8DkT3CeK/9vrezgI\n" + - "igNjneN9B4eIuzi/rJzIKeUwpZ2k5D+36Ab4esseoc+TopmNerw8hidt2g818jER\n" + - "D71ppSMakeQFPGe/Hs2/cVa/G1DNVcU2XAut45yRZ/+xsZ0/mcBDVsG9P5uGCN5O\n" + - "7SAp4J959WnKDqgVuU9WowPE5IjmS9BAv2gjniFYdDV2yksyf7+8edHd1KfSVX06\n" + - "pLx6CuCVZGJFG4Q2Aa1YAh1Wvt9hqWeXXpNRO2/wChL5rhT4GajsrGepsk4bjxYX\n" + - "Wf2iZ8mX\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - - // Validate valid - pathValidator.validate(new String[]{VALID, INT_VALID}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT_REVOKED}, - ValidatePathWithParams.Status.REVOKED, - "Mon May 15 13:36:57 PDT 2023", System.out); - } -} - -class AmazonCA_2 { - - // Owner: CN=Amazon RSA 4096 M02, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 2, O=Amazon, C=US - // Serial number: 773125b0c34c3c940299a9f04a39e5a52ccd9 - // Valid from: Tue Aug 23 15:29:13 PDT 2022 until: Fri Aug 23 15:29:13 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIGXjCCBEagAwIBAgITB3MSWww0w8lAKZqfBKOeWlLM2TANBgkqhkiG9w0BAQwF\n" + - "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n" + - "b24gUm9vdCBDQSAyMB4XDTIyMDgyMzIyMjkxM1oXDTMwMDgyMzIyMjkxM1owPDEL\n" + - "MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEcMBoGA1UEAxMTQW1hem9uIFJT\n" + - "QSA0MDk2IE0wMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMGMl/pZ\n" + - "1OsxHY9gw/YfdON4mmrANkPwi7z2djHA5ELt/vRI3Su0le6OoipLf03iyoCnYy4Y\n" + - "rpfTbhyDriE8NJpps2ODJ5W1h0rz6FM1Q5Jt35wfk+4CEfATBTegHVlUJ0rJgzK5\n" + - "Yl/jrk12ZsC4ZeRn54shszcK6bHj4LZIHXhrYIIfetBMMD8V7hlhd54AclEWutUV\n" + - "eBEjkSCzDSk+pQKIjCL0crqvRSPvUNry/BV65zfGmceSYxpcLmV7k7Spwpo+1z8w\n" + - "+Odfnx2vsm7olPldfaThqk6fXBtInORl4Ef32xF3VDT13UeXtQPolFhnp8UOci64\n" + - "bW+R8tbtGpUXIA8Dhr8SgYPH6NW4jhUD4+AG8yer8ctA1Hl9tq+6tYr26q3yuCLu\n" + - "5rwJdfMG634fWIRXSj+GJi8SfAdGtPyXwu5799NWesV4vUkrkSXdIBK4TQCuK+jx\n" + - "aJ5Y+Zo2l3GFsWyMPNORLjoQ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yuS94sUuE2EqvvO/\n" + - "t81qeoey6wThz5iRbU/0CvDFnTMgebWGUZ2UZJ+az/rb3KYXGfVWasLIonkvYT7z\n" + - "vHOGNAA9oQ8TTgPOmPfSVyfpplKtO/aybWp5QSH2csIwuvw5dkmpkc42iD57XHob\n" + - "5LbMJg99z3vQBmod/ipmOpND95/BeA2mllBZgZ53S0nvDXDzbzR9Fd81PAz9Qruo\n" + - "dOJKcD6plKQjZjkLzNh1v/RoCFO8kiJGE4UBMTM8FUk0DXH4bALII4wwmDelrSUu\n" + - "lKvDTDxZvPF4dbEXICNPd51EMGPgETxwboOV+bzWFVI0IWQ8PhZ2VuMPDk2taOMp\n" + - "NsuLtlYc2twPb9r/Hvgv7G6+ItpBHZwOVt1oI3pHbjMp7P3pOZSPr6G1WkNy9mX8\n" + - "rVc=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.rootca2.demo.amazontrust.com - // Issuer: CN=Amazon RSA 4096 M02, O=Amazon, C=US - // Serial number: 662f7646d76193cbb76946d111e49fa - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIICzCCBfOgAwIBAgIQBmL3ZG12GTy7dpRtER5J+jANBgkqhkiG9w0BAQwFADA8\n" + - "MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQQDExNBbWF6b24g\n" + - "UlNBIDQwOTYgTTAyMB4XDTIzMDUxMDAwMDAwMFoXDTI0MDYwNzIzNTk1OVowLTEr\n" + - "MCkGA1UEAxMidmFsaWQucm9vdGNhMi5kZW1vLmFtYXpvbnRydXN0LmNvbTCCAiIw\n" + - "DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAON5EbEKoBiujI7Ja8mLZLJbaY7f\n" + - "RtoWIjU/F0l9ueWFogXmEaA1jWsl97F3WTHTyGKz6ChCjPMSyoXXpY+yoE90QUyX\n" + - "w35uWEhNrc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wvr4HhkA4iChpwFm\n" + - "2UDTppHskSWyLsuNQvipn0zTzZ8RIxXd/ei0qCdhKmkV7x9cgbTiyXgaI7iJEtdo\n" + - "RvYNcXc2RmitWjY5Av8yJGOk0eYpCwRrBv6ughbtJe3NMrqUeTyrKidIEo9KnRSA\n" + - "rMokRbHunkroS97VkoK/9j9pNJki+qAH9XTLYWcm/5+cTSGRsN+escRgZwV6KWg/\n" + - "JQQe5LbwU2HHzNqWuk63GC/ngVlWXjaVFfbNVmYEKZFFazcZchesN1YyDu+WndOx\n" + - "+rTcuke2feOvQ4EnVviM0k85JZNiqPDH2iafAWyqZFUYTnb7XK3HhJflAniv/SLq\n" + - "DQfbJmtQtNHdJYgVmC1u2RT9gbJDIAj0ZI4vU2WVB5Hmd9F31un6jundEuG4+S4=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.rootca2.demo.amazontrust.com - // Issuer: CN=Amazon RSA 4096 M02, O=Amazon, C=US - // Serial number: 788baa8f47bc5b1c624424216240fd3 - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIIEjCCBfqgAwIBAgIQB4i6qPR7xbHGJEJCFiQP0zANBgkqhkiG9w0BAQwFADA8\n" + - "MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQQDExNBbWF6b24g\n" + - "UlNBIDQwOTYgTTAyMB4XDTIzMDUxMDAwMDAwMFoXDTI0MDYwNzIzNTk1OVowLzEt\n" + - "MCsGA1UEAxMkcmV2b2tlZC5yb290Y2EyLmRlbW8uYW1hem9udHJ1c3QuY29tMIIC\n" + - "IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAzJfddWdrWhA9dSJdmy23veN9\n" + - "oLvSqpM4YaXGZmPtKUmbFMLs2I3vCKrzflRKeOpl3MCc2hh6TH/3z+Q/fGugXLsY\n" + - "H8QcjSbiIOd15n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zAtBggrBgEFBQcwAYYhaHR0cDov\n" + - "L29jc3AucjRtMDIuYW1hem9udHJ1c3QuY29tMDYGCCsGAQUFBzAChipodHRwOi8v\n" + - "Y3J0LnI0bTAyLmFtYXpvbnRydXN0LmNvbS9yNG0wMi5jZXIwDAYDVR0TAQH/BAIw\n" + - "ADCCAX0GCisGAQQB1nkCBAIEggFtBIIBaQFnAHYA7s3QZNXbGs7FXLedtM0TojKH\n" + - "Rny87N7DUUhZRnEftZsAAAGIB72CzgAABAMARzBFAiEA2vPYIPfGJeynPaZHq/c0\n" + - "GGvyT6MpvFGMW0s0woLRT28CIEFbZbFSCnKugaqw9QDNi7vYmIF3Gyi3s6G2cCxY\n" + - "4RJXAHYASLDja9qmRzQP5WoC+p0w6xxSActW3SyB2bu/qznYhHMAAAGIB72DDgAA\n" + - "BAMARzBFAiAvfNcgtFEwk5C9dvMUYANbIAv0IOdF1new8Umn3cM+JwIhALbs/3L9\n" + - "0ndF7sRKDZmfronNruptFlrI528P5Qi2P528AHUA2ra/az+1tiKfm8K7XGvocJFx\n" + - "bLtRhIU0vaQ9MEjX+6sAAAGIB72CxQAABAMARjBEAiBKUns2FPbs0cThb6e7SnyL\n" + - "y4/qP3V1Q/ASt/ZDRTeEQQIgWSQO4Gsz32srtqYuTM9AsFd92WA44kJHincdcGVX\n" + - "XbIwDQYJKoZIhvcNAQEMBQADggIBAAnaNbn2wXylTCS7dtgB3rWdUf6hja1UDuvB\n" + - "uZEL2dUOvyXfVFLNxKdeWBPzqpwEBNNwPQXhoI97TXlyu2x60jLzQamoGoRQ3s0P\n" + - "NLhasLGEIQH/oYdMV/yp8EI8fUuRVE3xyw39FRqOrmsUFAnxNQmBO/09JM7sLcvS\n" + - "wwh14p9dFTTolJHgnL4ZEtmZxSddFG+GBSTJ/A7dVSmwIudwzd+goA6173BI6yeT\n" + - "hhQumLctQiOM7y1MzFeV8rL+oIpd2xuzyhKKT1EgvU6/wyt0Ib8QqsFsrXPnUOKk\n" + - "HAq3SeZyq35QUaTKoaH9L1iZMbSCG9Jm6FMb12SdAz53653tYvAiUS76oD8Jot13\n" + - "RZu5NUlWAVLLq0OaEtuGp0bh+cVtzVnCC9m1qa46YpY0SojpvSbakgQMMGIgDlT3\n" + - "wFE7tST4WlsDC1f/m+H9V5qz/j0U8D3eNNdowxPqx/JZq/sk9ZK5KyMFARrvM+fh\n" + - "YrVYjKt91mu7JaS4pPOyZmJ8OQ14EvrN7BXc7IkNrI1reeaRFe49k5DAETB8VmP5\n" + - "2F0SWou2KkgtJvU4Z7YjlZ2HNHnpjTK5KdPNpRSt7EUy2zn9NCNoyQhnws70FyXv\n" + - "oPFyG92lnUQOKaAUhVRwTr9fvnkdMOzSKg/spxi2Ogdzym5Jw68eguwi0dVqX2+9\n" + - "3zViP2aH\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon May 15 13:38:54 PDT 2023", System.out); - } -} - -class AmazonCA_3 { - - // Owner: CN=Amazon ECDSA 256 M02, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 3, O=Amazon, C=US - // Serial number: 773126de2c2fafd2c47ad88b1566e0182046d - // Valid from: Tue Aug 23 15:33:24 PDT 2022 until: Fri Aug 23 15:33:24 PDT 2030 - private static final String INT_VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIC1DCCAnmgAwIBAgITB3MSbeLC+v0sR62IsVZuAYIEbTAKBggqhkjOPQQDAjA5\n" + - "MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g\n" + - "Um9vdCBDQSAzMB4XDTIyMDgyMzIyMzMyNFoXDTMwMDgyMzIyMzMyNFowPTELMAkG\n" + - "A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEdMBsGA1UEAxMUQW1hem9uIEVDRFNB\n" + - "IDI1NiBNMDIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS9vQLD4W/Kg4AnFRl8\n" + - "x/FUbLqtd5ICYjUijGsytF9hmgb/Dyk+Ebt4cw6rAlGbaiOLapSJKZiZr+UQdh3I\n" + - "QOr+o4IBWjCCAVYwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYw\n" + - "HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB0GA1UdDgQWBBS7eJrXaDMy\n" + - "nRq7bP2xNEwB3svQdTAfBgNVHSMEGDAWgBSrttvXBp43rDCGB5Fwx5zEGbF4wDB7\n" + - "BggrBgEFBQcBAQRvMG0wLwYIKwYBBQUHMAGGI2h0dHA6Ly9vY3NwLnJvb3RjYTMu\n" + - "YW1hem9udHJ1c3QuY29tMDoGCCsGAQUFBzAChi5odHRwOi8vY3J0LnJvb3RjYTMu\n" + - "YW1hem9udHJ1c3QuY29tL3Jvb3RjYTMuY2VyMD8GA1UdHwQ4MDYwNKAyoDCGLmh0\n" + - "dHA6Ly9jcmwucm9vdGNhMy5hbWF6b250cnVzdC5jb20vcm9vdGNhMy5jcmwwEwYD\n" + - "VR0gBAwwCjAIBgZngQwBAgEwCgYIKoZIzj0EAwIDSQAwRgIhAKSYEcDcp3kcPMzh\n" + - "OIYDWZOLu4InPod4fQhRTmc2zBAgAiEAmwdGE4AuNWhw9N8REhf82rJLNm7h9Myg\n" + - "TsR9Wu0bQYU=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=Amazon ECDSA 256 M01, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 3, O=Amazon, C=US - // Serial number: 773126684d577c0fcf8d3a342bea86f94fc8f - // Valid from: Tue Aug 23 15:31:46 PDT 2022 until: Fri Aug 23 15:31:46 PDT 2030 - private static final String INT_REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIC0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n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.rootca3.demo.amazontrust.com - // Issuer: CN=Amazon ECDSA 256 M02, O=Amazon, C=US - // Serial number: 8e2f14864fb28e4a1da0f15a5118cc8 - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEfjCCBCWgAwIBAgIQCOLxSGT7KOSh2g8VpRGMyDAKBggqhkjOPQQDAjA9MQsw\n" + - "CQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMR0wGwYDVQQDExRBbWF6b24gRUNE\n" + - "U0EgMjU2IE0wMjAeFw0yMzA1MTAwMDAwMDBaFw0yNDA2MDcyMzU5NTlaMC0xKzAp\n" + - "BgNVBAMTInZhbGlkLnJvb3RjYTMuZGVtby5hbWF6b250cnVzdC5jb20wWTATBgcq\n" + - "hkjOPQIBBggqhkjOPQMBBwNCAAQfWc7gBGBBBmseCb2XWWRQVhCUQDVml3mVgvj5\n" + - "RmnP1y5wpifUTFqu8ELdI7YGZ4JMSnetiKNmLtg5yhTEjzCQo4IDFTCCAxEwHwYD\n" + - "VR0jBBgwFoAUu3ia12gzMp0au2z9sTRMAd7L0HUwHQYDVR0OBBYEFHCE8orvZDUK\n" + - "5TI9MYadzxWR9CZGMEkGA1UdEQRCMECCInZhbGlkLnJvb3RjYTMuZGVtby5hbWF6\n" + - "b250cnVzdC5jb22CGmdvb2Quc2NhM2EuYW1hem9udHJ1c3QuY29tMA4GA1UdDwEB\n" + - "/wQEAwIHgDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwOwYDVR0fBDQw\n" + - "MjAwoC6gLIYqaHR0cDovL2NybC5lMm0wMi5hbWF6b250cnVzdC5jb20vZTJtMDIu\n" + - "Y3JsMBMGA1UdIAQMMAowCAYGZ4EMAQIBMHUGCCsGAQUFBwEBBGkwZzAtBggrBgEF\n" + - "BQcwAYYhaHR0cDovL29jc3AuZTJtMDIuYW1hem9udHJ1c3QuY29tMDYGCCsGAQUF\n" + - "BzAChipodHRwOi8vY3J0LmUybTAyLmFtYXpvbnRydXN0LmNvbS9lMm0wMi5jZXIw\n" + - "DAYDVR0TAQH/BAIwADCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUA7s3QZNXb\n" + - "Gs7FXLedtM0TojKHRny87N7DUUhZRnEftZsAAAGIB71y/gAABAMARjBEAiAEAXIb\n" + - "aOVR26HgFaI+qoIasCb8w2sOqVxGAxf5iPgX6QIgdAlMjqeoihi1arnJpzN8Bqxy\n" + - "5ULMUO7GK3JEgcogJHMAdgBIsONr2qZHNA/lagL6nTDrHFIBy1bdLIHZu7+rOdiE\n" + - "cwAAAYgHvXLkAAAEAwBHMEUCIF7wDDmWxTHwBZM7Me8eOCM1aQ/g1c1rJg/I+NJa\n" + - "HkZYAiEA8p+IviuY5piHBELjUtVlZLiS9XSSMxpQNhUerqC/YFoAdQDatr9rP7W2\n" + - "Ip+bwrtca+hwkXFsu1GEhTS9pD0wSNf7qwAAAYgHvXKvAAAEAwBGMEQCIFLskZDs\n" + - "UG4+/88D/5/QbD9zT6ZmZlwXiPZ6H2YR/KiJAiBvi4vvNsb9KNAhJMgI2T2iCg9U\n" + - "CIru+US6y3ua7dKKDTAKBggqhkjOPQQDAgNHADBEAiAzvgzKV/kvBbKWCT1NNUBD\n" + - "AF9okIEcJx/ukFgzmYMwUQIgXeJeVf3izkxsgiEUSknwHsErLFs/cEme2PSRj2AW\n" + - "dYA=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.rootca3.demo.amazontrust.com - // Issuer: CN=Amazon ECDSA 256 M01, O=Amazon, C=US - // Serial number: c458bfaeedae16a5e61fe64773fc898 - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIEhzCCBC2gAwIBAgIQDEWL+u7a4WpeYf5kd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iAe9lQ8AAAQDAEcw\n" + - "RQIgZVFAX5WPZRBpEOqk620v4Rbzxh/3wrJ5QBMBJ0Mb8B0CIQC0oxFVLfs+PAv7\n" + - "25wawOu2VgDXG9lJAJtCwk3gN8BshQB2AEiw42vapkc0D+VqAvqdMOscUgHLVt0s\n" + - "gdm7v6s52IRzAAABiAe9lQ4AAAQDAEcwRQIhAIPVMj6IfjAUKeGYbpG9s0DRdWbc\n" + - "b8OzsOf+kRqk03NMAiB777hfoFCUMPrN0g8o5v6zp3T3qOhRnYY0TZN4q4NnMgB1\n" + - "ANq2v2s/tbYin5vCu1xr6HCRcWy7UYSFNL2kPTBI1/urAAABiAe9lN4AAAQDAEYw\n" + - "RAIgL0qoVbKLFD+Y3f/V6Rw+euZrPO6d1HEVPQGo7wLzkl8CIGHp3PQmmrEofl76\n" + - "4da7bY0L+csFW0sB8clN0KziMfe6MAoGCCqGSM49BAMCA0gAMEUCIQC+6VdX9X5g\n" + - "x3NSUmJ7py01Zxf26TNBv1ildxqesvZ/7wIgIrefriRzPiIFDHCUbdjk0VlmMwZR\n" + - "VzXXHINsGCiCKOs=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - - // Validate valid - pathValidator.validate(new String[]{VALID, INT_VALID}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT_REVOKED}, - ValidatePathWithParams.Status.REVOKED, - "Mon May 15 13:41:22 PDT 2023", System.out); - } -} - -class AmazonCA_4 { - - // Owner: CN=Amazon ECDSA 384 M02, O=Amazon, C=US - // Issuer: CN=Amazon Root CA 4, O=Amazon, C=US - // Serial number: 773127dfaa6b9e2b95538aa76dde4307f17c4 - // Valid from: Tue Aug 23 15:36:58 PDT 2022 until: Fri Aug 23 15:36:58 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDETCCApagAwIBAgITB3MSffqmueK5VTiqdt3kMH8XxDAKBggq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HW\n" + - "9Wj7SxKnOU5+wYWZA0BQAv1KT62i\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.rootca4.demo.amazontrust.com - // Issuer: CN=Amazon ECDSA 384 M02, O=Amazon, C=US - // Serial number: f579bed3369f1a147ea5d0e8e6532d3 - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEvjCCBESgAwIBAgIQD1eb7TNp8aFH6l0OjmUy0zAKBggqhkjOPQQDAzA9MQsw\n" + - "CQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMR0wGwYDVQQDExRBbWF6b24gRUNE\n" + - "U0EgMzg0IE0wMjAeFw0yMzA1MTAwMDAwMDBaFw0yNDA2MDcyMzU5NTlaMC0xKzAp\n" + - "BgNVBAMTInZhbGlkLnJvb3RjYTQuZGVtby5hbWF6b250cnVzdC5jb20wdjAQBgcq\n" + - "hkjOPQIBBgUrgQQAIgNiAAT6/95JFuvx5t9MVeRZmBtXq63Q2fXZnSwEy2U2F4Qc\n" + - "ejhDwcYfD2HmT6S6GrKqLNJMa5n2YOvet4LZpKJLFF+BQo6FJt5cXkzHHxZ1I4z3\n" + - "8pGU79CpCgFOFy6QUlF68NajggMXMIIDEzAfBgNVHSMEGDAWgBSm2as7h5kz/+ho\n" + - "+Ithg2zQsrqvvTAdBgNVHQ4EFgQUR/GnpQkrUsCj8jF6/JIE1Rs07zswSQYDVR0R\n" + - "BEIwQIIidmFsaWQucm9vdGNhNC5kZW1vLmFtYXpvbnRydXN0LmNvbYIaZ29vZC5z\n" + - "Y2E0YS5hbWF6b250cnVzdC5jb20wDgYDVR0PAQH/BAQDAgeAMB0GA1UdJQQWMBQG\n" + - "CCsGAQUFBwMBBggrBgEFBQcDAjA7BgNVHR8ENDAyMDCgLqAshipodHRwOi8vY3Js\n" + - "LmUzbTAyLmFtYXpvbnRydXN0LmNvbS9lM20wMi5jcmwwEwYDVR0gBAwwCjAIBgZn\n" + - "gQwBAgEwdQYIKwYBBQUHAQEEaTBnMC0GCCsGAQUFBzABhiFodHRwOi8vb2NzcC5l\n" + - "M20wMi5hbWF6b250cnVzdC5jb20wNgYIKwYBBQUHMAKGKmh0dHA6Ly9jcnQuZTNt\n" + - "MDIuYW1hem9udHJ1c3QuY29tL2UzbTAyLmNlcjAMBgNVHRMBAf8EAjAAMIIBfgYK\n" + - "KwYBBAHWeQIEAgSCAW4EggFqAWgAdgDuzdBk1dsazsVct520zROiModGfLzs3sNR\n" + - "SFlGcR+1mwAAAYgHvZA9AAAEAwBHMEUCIQCmzmQOzunsuAg1GpIcNx0isG6ylbhP\n" + - "y9JP4UFclL2hdwIgBtTM89mE7QJDj7h7xr2eRPio1ehgmeYH1PHXxCqHIGYAdgBI\n" + - "sONr2qZHNA/lagL6nTDrHFIBy1bdLIHZu7+rOdiEcwAAAYgHvZB1AAAEAwBHMEUC\n" + - "IF9hbi82CLU5umfRze4NpX6u4jlT+N8KSaBe6UbhqjBZAiEAi2Y6PTt2+107LxtM\n" + - "oBpHprph7hQvGfjPE+p+rfM/X+EAdgDatr9rP7W2Ip+bwrtca+hwkXFsu1GEhTS9\n" + - "pD0wSNf7qwAAAYgHvZBeAAAEAwBHMEUCIAI+m4mVE3HtZOEMC5VI7m0nEPdPPJUq\n" + - "fxUKPpeIVmk5AiEA0scVJy7g3Fv+2nTVhbcwWCwn/Gvc+0txQrc529juflcwCgYI\n" + - "KoZIzj0EAwMDaAAwZQIxAKV837BpqlNHg35EsCCtrJPoQ6RuY9UoHm1O2CdsCXGR\n" + - "Z3kAnlgIV8A/waI6wQqfsQIwdCqaC+qN60JCnX09YKRD15eQjq1rN3w+llI+lEbS\n" + - "FSMsnoHJcqMZLo9s+4Rf0zS3\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.rootca4.demo.amazontrust.com - // Issuer: CN=Amazon ECDSA 384 M02, O=Amazon, C=US - // Serial number: 4a5d392936b4decb818b7fb106ebbd8 - // Valid from: Tue May 09 17:00:00 PDT 2023 until: Fri Jun 07 16:59:59 PDT 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIExjCCBEygAwIBAgIQBKXTkpNrTey4GLf7EG672DAKBggqhkjOPQQDAzA9MQsw\n" + - "CQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMR0wGwYDVQQDExRBbWF6b24gRUNE\n" + - "U0EgMzg0IE0wMjAeFw0yMzA1MTAwMDAwMDBaFw0yNDA2MDcyMzU5NTlaMC8xLTAr\n" + - "BgNVBAMTJHJldm9rZWQucm9vdGNhNC5kZW1vLmFtYXpvbnRydXN0LmNvbTB2MBAG\n" + - "ByqGSM49AgEGBSuBBAAiA2IABFYfMbv5/vgqDunZj4ffJiuELtdwfEPXx9QlZnCm\n" + - "rBP3Z4/GvUVRVmyh5sYdnbCGCEClH/RxU6BC5SKv+TzhsFLEumhezanljnQXRAIL\n" + - "a1OGbP8zLLP6FuAD0cjY3P3adKOCAx0wggMZMB8GA1UdIwQYMBaAFKbZqzuHmTP/\n" + - "6Gj4i2GDbNCyuq+9MB0GA1UdDgQWBBSqnGV5pN/agPCtVdV37CP1z/DUqjBOBgNV\n" + - "HREERzBFgiRyZXZva2VkLnJvb3RjYTQuZGVtby5hbWF6b250cnVzdC5jb22CHXJl\n" + - "dm9rZWQuc2NhNGEuYW1hem9udHJ1c3QuY29tMA4GA1UdDwEB/wQEAwIHgDAdBgNV\n" + - "HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwOwYDVR0fBDQwMjAwoC6gLIYqaHR0\n" + - "cDovL2NybC5lM20wMi5hbWF6b250cnVzdC5jb20vZTNtMDIuY3JsMBMGA1UdIAQM\n" + - "MAowCAYGZ4EMAQIBMHUGCCsGAQUFBwEBBGkwZzAtBggrBgEFBQcwAYYhaHR0cDov\n" + - "L29jc3AuZTNtMDIuYW1hem9udHJ1c3QuY29tMDYGCCsGAQUFBzAChipodHRwOi8v\n" + - "Y3J0LmUzbTAyLmFtYXpvbnRydXN0LmNvbS9lM20wMi5jZXIwDAYDVR0TAQH/BAIw\n" + - "ADCCAX8GCisGAQQB1nkCBAIEggFvBIIBawFpAHYAdv+IPwq2+5VRwmHM9Ye6NLSk\n" + - "zbsp3GhCCp/mZ0xaOnQAAAGIB72QJQAABAMARzBFAiA74zKrlL+y5rYwSLxBL8fs\n" + - "QYRYXF0s0sGoaSEeAg1DkgIhAPu8Z0TLIFoppmyiv+A5z6S+SG+v/kOsAYmQmiUO\n" + - "5scIAHcASLDja9qmRzQP5WoC+p0w6xxSActW3SyB2bu/qznYhHMAAAGIB72QJgAA\n" + - "BAMASDBGAiEAg+x7JBT3oIaZdnfgGN1G6SAiNUL7zR/tBhbWIG9tz94CIQDGwBiV\n" + - "Tslt11+W3ZaNsS7UtUIiB45YHUc4qKm5ry2fTAB2ANq2v2s/tbYin5vCu1xr6HCR\n" + - "cWy7UYSFNL2kPTBI1/urAAABiAe9kAgAAAQDAEcwRQIgPvKfSpMJKRocGk9+GNr3\n" + - "hUj8x8WySB//0X116TNgA0gCIQDhGRqxnEZmEFGEfj5GY9vjEfm0kKwcL0lCuwBu\n" + - "NZG4dzAKBggqhkjOPQQDAwNoADBlAjEA1PLdsrko3tDs50aAeEU9Gn+0CG8QKy7R\n" + - "fQaXBTjGETDgGJk/7zGNpGelKPr/UYV9AjASwdA32S8jIADxA8HrqiMsVYDFMnbU\n" + - "jLLwR6CTLtAcWtwVmoQ2x0usvTvN8YJBPoA=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon May 15 13:42:48 PDT 2023", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/BuypassCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/BuypassCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/BuypassCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/BuypassCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,330 +0,0 @@ -/* - * Copyright (c) 2017, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* - * @test - * @bug 8189131 - * @summary Interoperability tests with Buypass Class 2 and Class 3 CA - * @build ValidatePathWithParams - * @run main/othervm/timeout=180 -Djava.security.debug=certpath BuypassCA OCSP - * @run main/othervm/timeout=180 -Djava.security.debug=certpath BuypassCA CRL - */ - - /* - * Obtain test artifacts for Buypass Class 2 and Class 3 CAs from: - * Buypass Class 3 CA 2 - * https://valid.qcevident.ca23.ssl.buypass.no/ - * https://revoked.qcevident.ca23.ssl.buypass.no/ - * https://expired.qcevident.ca23.ssl.buypass.no/ - * https://valid.evident.ca23.ssl.buypass.no/ - * https://revoked.evident.ca23.ssl.buypass.no/ - * https://expired.evident.ca23.ssl.buypass.no/ - * https://valid.businessplus.ca23.ssl.buypass.no - * https://revoked.businessplus.ca23.ssl.buypass.no - * https://expired.businessplus.ca23.ssl.buypass.no - - * Buypass Class 2 CA 2 - * https://valid.business.ca22.ssl.buypass.no - * https://revoked.business.ca22.ssl.buypass.no - * https://expired.business.ca22.ssl.buypass.no - * https://valid.domain.ca22.ssl.buypass.no - * https://revoked.domain.ca22.ssl.buypass.no - * https://expired.domain.ca22.ssl.buypass.no/ - */ -public class BuypassCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new BuypassClass2().runTest(pathValidator); - new BuypassClass3().runTest(pathValidator); - } -} - -class BuypassClass2 { - - // Owner: CN=Buypass Class 2 CA 2, O=Buypass AS-983163327, C=NO - // Issuer: CN=Buypass Class 2 Root CA, O=Buypass AS-983163327, C=NO - // Serial number: 1b781c6d5e34ce1f77 - // Valid from: Mon Mar 25 05:17:10 PDT 2019 until: Sat Oct 26 02:16:17 PDT 2030 - private static final String INT_CLASS_2 = "-----BEGIN CERTIFICATE-----\n" + - "MIIFKTCCAxGgAwIBAgIJG3gcbV40zh93MA0GCSqGSIb3DQEBCwUAME4xCzAJBgNV\n" + - "BAYTAk5PMR0wGwYDVQQKDBRCdXlwYXNzIEFTLTk4MzE2MzMyNzEgMB4GA1UEAwwX\n" + - "QnV5cGFzcyBDbGFzcyAyIFJvb3QgQ0EwHhcNMTkwMzI1MTIxNzEwWhcNMzAxMDI2\n" + - "MDkxNjE3WjBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMx\n" + - "NjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAyMIIBIjANBgkqhkiG\n" + - "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKtnxpZLDQ+R0uzKzDMr83L8Dn+5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xISadx12nbxn0LsU2k8Xyt830DqhHGSoYHEC/iGxbU4Bub8NC0uw/\n" + - "QNBj5Gd5cXLFhRUWLLBTq4p6P6kLc7JudpM4FNQ+stWK/eDZylbDLN3iCBRnHH4p\n" + - "qg6HAlWuieiAKVsidBMxPUyDLJ/8Dt+aW8Z3vCNcYC2n7wqrLZz5e4FG+Wn9teFW\n" + - "Rt5pO6ZUZAkDS59ZVojbbjOdQzNw3QHtZl0IMHeNYXJlPIUlHi4hGL3maGZ9sBF+\n" + - "AMfMLDu56+J2DewIuTXPzCeJeSTam/ybNt5FxTznxCSCIDqwmZMy3AQEz9nGSbE8\n" + - "zfwB5VT2ijLB0PpPX4YbLf33Vodf0NAkBUv6N5It30XiTUPhdk+caBYPoljz/J9U\n" + - "15T5+EGHs8ccHQWyYQ6gqYk8o4JgP4rSJqO1sMI=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.domain.ca22.ssl.buypass.no - // Issuer: CN=Buypass Class 2 CA 2, O=Buypass AS-983163327, C=NO - // Serial number: 34e2bff8063debd18d79 - // Valid from: Mon Sep 23 04:12:34 PDT 2019 until: Mon Oct 11 14:59:00 PDT 2021 - private static final String VALID_CLASS_2 = "-----BEGIN CERTIFICATE-----\n" + - "MIIF8jCCBNqgAwIBAgIKNOK/+AY969GNeTANBgkqhkiG9w0BAQsFADBLMQswCQYD\n" + - "VQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMM\n" + - "FEJ1eXBhc3MgQ2xhc3MgMiBDQSAyMB4XDTE5MDkyMzExMTIzNFoXDTIxMTAxMTIx\n" + - "NTkwMFowKzEpMCcGA1UEAwwgdmFsaWQuZG9tYWluLmNhMjIuc3NsLmJ1eXBhc3Mu\n" + - "bm8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCeu/8j7y55R3OucDek\n" + - "gtdoVOEJQb2XaCR4OwiRzn74hLYhKGdFmFwSp+bPCT62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hh0taFVSTmluGsHmXPMCIQq9hLAB\n" + - "VYgyAHYApLkJkLQYWBSHuxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFtXdLbFwAA\n" + - "BAMARzBFAiBhr7KQc9yO3zb1iLlE0JW9whR0/bhrPDkk5BYnBKjzFAIhAMMTdHfk\n" + - "1ljso5jKzIUcBpSW0HnTcuKiB3VxGpL7GFVWAHUAb1N2rDHwMRnYmQCkURX/dxUc\n" + - "EdkCwQApBo2yCJo32RMAAAFtXdLYSAAABAMARjBEAiADoZr6Cp5AGM1eT2aUeRaQ\n" + - "kv0vRaegjRGIhKRCvRGyFAIgWLU/7zh28LI8vAyWr8mpDqlUXvF13i3zSD3whq4L\n" + - "Lu4wDQYJKoZIhvcNAQELBQADggEBAJH1RhTuMbhEOYlw+Efbx7PP7EEC/GQ1ijET\n" + - "vZS45jFQyTKhFUcdP2QPAtEVo1nS8PBs0txQJBf0xceWUjer9ruxiAS+JlW21AOi\n" + - "Uq9Kahpj5k63Z7tN8KTeOUE8wZGmHyvVcPP6mkC94RbjYIb4gd13eYxd2Vv1a7YX\n" + - "dNI+J3g7sX5ijssfJxzDd0hORj2584YY2WiKKvIGxwDnLkxk09i3IvjEKsAi4Cgn\n" + - "5798X5sSL1Q9C6gHEWt+cB5UtfILCfbLNRczS9zGku6gjh1c8dB7zc63mn7oCf1C\n" + - "gnQ2xqwbZb3Wau8CPwcMqJWgQZLQFPbZd+4Xo5SDDqYppV4oN2A=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.domain.ca22.ssl.buypass.no - // Issuer: CN=Buypass Class 2 CA 2, O=Buypass AS-983163327, C=NO - // Serial number: 34e4b97261795f98c495 - // Valid from: Mon Sep 23 04:52:42 PDT 2019 until: Thu Sep 23 14:59:00 PDT 2021 - private static final String REVOKED_CLASS_2 = "-----BEGIN CERTIFICATE-----\n" + - "MIIF9zCCBN+gAwIBAgIKNOS5cmF5X5jElTANBgkqhkiG9w0BAQsFADBLMQswCQYD\n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zDOmkVES1snvVQ==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID_CLASS_2, INT_CLASS_2}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED_CLASS_2, INT_CLASS_2}, - ValidatePathWithParams.Status.REVOKED, - "Mon Sep 23 04:53:18 PDT 2019", System.out); - } -} - -class BuypassClass3 { - - // Owner: CN=Buypass Class 3 CA 2, O=Buypass AS-983163327, C=NO - // Issuer: CN=Buypass Class 3 Root CA, O=Buypass AS-983163327, C=NO - // Serial number: 1be0dc6a3e7f220475 - // Valid from: Mon Mar 25 05:12:16 PDT 2019 until: Sat Oct 26 01:16:17 PDT 2030 - private static final String INT_CLASS_3 = "-----BEGIN CERTIFICATE-----\n" + - "MIIFKTCCAxGgAwIBAgIJG+Dcaj5/IgR1MA0GCSqGSIb3DQEBCwUAME4xCzAJBgNV\n" + - "BAYTAk5PMR0wGwYDVQQKDBRCdXlwYXNzIEFTLTk4MzE2MzMyNzEgMB4GA1UEAwwX\n" + - "QnV5cGFzcyBDbGFzcyAzIFJvb3QgQ0EwHhcNMTkwMzI1MTIxMjE2WhcNMzAxMDI2\n" + - "MDgxNjE3WjBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMx\n" + - "NjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMyBDQSAyMIIBIjANBgkqhkiG\n" + - "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvU4V2hRFFe4K7BMEmm4IoMTwS7NyDQB4JEar\n" + - "dV1qBsKHIIQJDm9hbCakcLIWXVv6vYrJZ1AEF0b6awBwhhlqXlyNnOtNa9uR+IAP\n" + - "86d4yOGpgHSlNAhdtOOk9Qw6MUzzBo1lyoYmoL0f5n02SMrlMcArSg458o08eDUx\n" + - "4iZs4dXDR9Hjxac2s+mdAO35Js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R87ysSKnjtteXbxMWVtwkeBALT\n" + - "K7DbJA+5aOCYRNj6CJGULQKiGlC01/ipORKewf5J3yus81lLHzBmgQMA5l9RL8rV\n" + - "6dI246mPpQ+8WDLsDrK3ydSDv5izgdVHzhL0tT2u4vwSq2WUqCgi4xLIA1N/fA2H\n" + - "xEW7zh0X/3YVz++g/6bd7iqRD9nRRZxACekRbza7AqU5xN1UjvVtCJQ9VC74K9KP\n" + - "pBoLWE2Bz5ksL9VUc4kS+WGORvZrSE1EpBq6cHc=\n" + - "-----END CERTIFICATE-----"; - - // Owner: SERIALNUMBER=983163327, CN=valid.businessplus.ca23.ssl.buypass.no, O=BUYPASS AS, - // L=OSLO, OID.2.5.4.17=0484, C=NO - // Issuer: CN=Buypass Class 3 CA 2, O=Buypass AS-983163327, C=NO - // Serial number: 267b7a9f0c3da9b94b39 - // Valid from: Mon Sep 23 04:17:42 PDT 2019 until: Mon Oct 11 14:59:00 PDT 2021 - private static final String VALID_CLASS_3 = "-----BEGIN CERTIFICATE-----\n" + - "MIIGUTCCBTmgAwIBAgIKJnt6nww9qblLOTANBgkqhkiG9w0BAQsFADBLMQswCQYD\n" + - "VQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMM\n" + - "FEJ1eXBhc3MgQ2xhc3MgMyBDQSAyMB4XDTE5MDkyMzExMTc0MloXDTIxMTAxMTIx\n" + - "NTkwMFowgYUxCzAJBgNVBAYTAk5PMQ0wCwYDVQQRDAQwNDg0MQ0wCwYDVQQHDARP\n" + - "U0xPMRMwEQYDVQQKDApCVVlQQVNTIEFTMS8wLQYDVQQDDCZ2YWxpZC5idXNpbmVz\n" + - "c3BsdXMuY2EyMy5zc2wuYnV5cGFzcy5ubzESMBAGA1UEBRMJOTgzMTYzMzI3MIIB\n" + - "IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArqj6dPVIQUULBV/S+u2/Rfko\n" + - "3BljX/KMEAclJHPu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u9Jys24rtmLz9yCNYJfZDvooK5PT9+rWR\n" + - "OC4+AHUApLkJkLQYWBSHuxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFtXdd54gAA\n" + - "BAMARjBEAiB09qp4sGA+Kxg823hea3ZyTV7mU1ZQ9j9fqqX8KZ1mpwIgUICM2H0Y\n" + - "8z+V9m+6SutZ5WTD+Arg3K8O6/dvyKu0QmEAdQBvU3asMfAxGdiZAKRRFf93FRwR\n" + - "2QLBACkGjbIImjfZEwAAAW1d13cSAAAEAwBGMEQCIFLqxvNOKVFlTjHPXwk93VeW\n" + - "zCqFtcxJkunD/iiv0Kn9AiBoyvUrjYn4MPTht9zb0OyaSMWb00/HXP/4AVmUzHrz\n" + - "YzANBgkqhkiG9w0BAQsFAAOCAQEAsmQAOn1f1CbvnOpggS2efmy1pQXvvw+YeCYP\n" + - "bElO578h7scn8al4N7huQZ/z14BELe0chGWNA/ReW5nAu3SUOiv+E8/kv9i9Y8ul\n" + - "MJPL62nXW6Z/mkyystuBNtON420iWL/gS/vduxSZE/iBB4znctDpXS917/XWf31Y\n" + - "ZonemF3MSfi/s9V0Ic82ZY/+HZ4NLTDyKRd4kFF58OoH9RZNb6g8MbTp+gPadiUG\n" + - "UcfPGV3yGiugQa7WHTl7QJ9ishyafiZ4hpeKem6TMDEztgGyLIZ4MSxQvoeI2jJP\n" + - "KjHd5fW/HClbEcrN+w0a0MUNMaAOaZfMS7jS6sDpaVL8D0EX5A==\n" + - "-----END CERTIFICATE-----"; - - // Owner: SERIALNUMBER=983163327, CN=revoked.businessplus.ca23.ssl.buypass.no, O=BUYPASS AS, - // L=OSLO, OID.2.5.4.17=0484, C=NO - // Issuer: CN=Buypass Class 3 CA 2, O=Buypass AS-983163327, C=NO - // Serial number: 267cee3fab06c615fb27 - // Valid from: Mon Sep 23 04:56:56 PDT 2019 until: Thu Sep 23 14:59:00 PDT 2021 - private static final String REVOKED_CLASS_3 = "-----BEGIN CERTIFICATE-----\n" + - "MIIGWDCCB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2k3lqqsp/uwqvLBItJDvA8pfi\n" + - "2R46sEtj2gFpAlKFDwepuaklqhrvEoIjIaAL0RrGfKY0oRQw1YMbPNIebsVaWr04\n" + - "rt6tlxrq7PyW1w9Mt3445WA1NzSWc7pAjFLfY6u87QaPHI4ES31H9xxRDsxmr6Y3\n" + - "BJmiWd5uUxev0nVw0saqvlo4yAEBq4rI/DieKcQI4qEI8myzoS0R0azMfLM=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID_CLASS_3, INT_CLASS_3}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED_CLASS_3, INT_CLASS_3}, - ValidatePathWithParams.Status.REVOKED, - "Mon Sep 23 04:57:31 PDT 2019", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,695 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test id=actalisauthenticationrootca + * @bug 8189131 + * @summary Interoperability tests with Actalis CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp + * CAInterop actalisauthenticationrootca OCSP + * @run main/othervm/timeout=180 -Djava.security.debug=certpath,ocsp + * CAInterop actalisauthenticationrootca CRL + */ + +/* + * @test id=amazonrootca1 + * @bug 8233223 + * @summary Interoperability tests with Amazon's CA1 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop amazonrootca1 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop amazonrootca1 CRL + */ + +/* + * @test id=amazonrootca2 + * @bug 8233223 + * @summary Interoperability tests with Amazon's CA2 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop amazonrootca2 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop amazonrootca2 CRL + */ + +/* + * @test id=amazonrootca3 + * @bug 8233223 + * @summary Interoperability tests with Amazon's CA3 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop amazonrootca3 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop amazonrootca3 CRL + */ + +/* + * @test id=amazonrootca4 + * @bug 8233223 + * @summary Interoperability tests with Amazon's CA4 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop amazonrootca4 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop amazonrootca4 CRL + */ + +/* + * @test id=buypassclass2ca + * @bug 8189131 + * @summary Interoperability tests with Buypass Class 2 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop buypassclass2ca OCSP + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop buypassclass2ca CRL + */ + +/* + * @test id=buypassclass3ca + * @bug 8189131 + * @summary Interoperability tests with Buypass Class 3 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop buypassclass3ca OCSP + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop buypassclass3ca CRL + */ + +/* + * @test id=comodorsaca + * @bug 8189131 + * @summary Interoperability tests with Comodo RSA CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop comodorsaca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop comodorsaca CRL + */ + +/* + * @test id=comodoeccca + * @bug 8189131 + * @summary Interoperability tests with Comodo ECC CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop comodoeccca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop comodoeccca CRL + */ + +/* + * @test id=usertrustrsaca + * @bug 8189131 + * @summary Interoperability tests with Comodo userTrust RSA CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop usertrustrsaca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop usertrustrsaca CRL + */ + +/* + * @test id=usertrusteccca + * @bug 8189131 + * @summary Interoperability tests with Comodo userTrust ECC CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop usertrusteccca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop usertrusteccca CRL + */ + +/* + * @test id=letsencryptisrgx1 + * @bug 8189131 + * @summary Interoperability tests with Let's Encrypt ISRG Root X1 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop letsencryptisrgx1 DEFAULT + */ + +/* + * @test id=letsencryptisrgx2 + * @bug 8317374 + * @summary Interoperability tests with Let's Encrypt ISRG Root X2 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop letsencryptisrgx2 DEFAULT + */ + +/* + * @test id=globalsignrootcar6 + * @bug 8216577 + * @summary Interoperability tests with GlobalSign R6 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop globalsignrootcar6 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop globalsignrootcar6 CRL + */ + +/* + * @test id=entrustrootcaec1 + * @bug 8195774 + * @summary Interoperability tests with Entrust CAs + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop entrustrootcaec1 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop entrustrootcaec1 CRL + */ + +/* + * @test id=entrustrootcag4 + * @bug 8243321 + * @summary Interoperability tests with Entrust CAs + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop entrustrootcag4 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop entrustrootcag4 CRL + */ + +/* + * @test id=godaddyrootg2ca + * @bug 8196141 + * @summary Interoperability tests with GoDaddy CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop godaddyrootg2ca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop godaddyrootg2ca CRL + */ + +/* + * @test id=starfieldrootg2ca + * @bug 8196141 + * @summary Interoperability tests with Starfield CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop starfieldrootg2ca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop starfieldrootg2ca CRL + */ + +/* + * @test id=globalsigneccrootcar4 + * @bug 8307134 + * @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 + */ + +/* + * @test id=gtsrootcar1 + * @bug 8307134 + * @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 + */ + +/* + * @test id=gtsrootcar2 + * @bug 8307134 + * @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 + */ + +/* + * @test id=gtsrootecccar3 + * @bug 8307134 + * @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 + */ + +/* + * @test id=gtsrootecccar4 + * @bug 8307134 + * @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 + */ + +/* + * @test id=microsoftecc2017 + * @bug 8304760 + * @summary Interoperability tests with Microsoft TLS root CAs + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop microsoftecc2017 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop microsoftecc2017 CRL + */ + +/* + * @test id=microsoftrsa2017 + * @bug 8304760 + * @summary Interoperability tests with Microsoft TLS root CAs + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop microsoftrsa2017 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop microsoftrsa2017 CRL + */ + +/* + * @test id=quovadisrootca1g3 + * @bug 8189131 + * @summary Interoperability tests with QuoVadis Root CA1 G3 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop quovadisrootca1g3 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop quovadisrootca1g3 CRL + */ + +/* + * @test id=quovadisrootca2g3 + * @bug 8189131 + * @summary Interoperability tests with QuoVadis Root CA2 G3 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop quovadisrootca2g3 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop quovadisrootca2g3 CRL + */ + +/* + * @test id=quovadisrootca3g3 + * @bug 8189131 + * @summary Interoperability tests with QuoVadis Root CA3 G3 CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop quovadisrootca3g3 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop quovadisrootca3g3 CRL + */ + +/* + * @test id=digicerttlseccrootg5 + * @bug 8318759 + * @summary Interoperability tests with DigiCert TLS ECC P384 Root G5 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop digicerttlseccrootg5 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop digicerttlseccrootg5 CRL + */ + +/* + * @test id=digicerttlsrsarootg5 + * @bug 8318759 + * @summary Interoperability tests with DigiCert TLS RSA4096 Root G5 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop digicerttlsrsarootg5 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop digicerttlsrsarootg5 CRL + */ + +/* + * @test id=sslrootrsaca + * @bug 8243320 + * @summary Interoperability tests with SSL.com's RSA CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop sslrootrsaca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop sslrootrsaca CRL + */ + +/* + * @test id=sslrootevrsaca + * @bug 8243320 + * @summary Interoperability tests with SSL.com's EV RSA CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop sslrootevrsaca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop sslrootevrsaca CRL + */ + +/* + * @test id=sslrooteccca + * @bug 8243320 + * @summary Interoperability tests with SSL.com's ECC CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop sslrooteccca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop sslrooteccca CRL + */ + +/* + * @test id=teliasonerarootcav1 + * @bug 8210432 + * @summary Interoperability tests with TeliaSonera Root CA v1 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop teliasonerarootcav1 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop teliasonerarootcav1 CRL + */ + +/* + * @test id=twcaglobalrootca + * @bug 8305975 + * @summary Interoperability tests with TWCA Global Root CA from TAIWAN-CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop twcaglobalrootca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop twcaglobalrootca CRL + */ + +/* + * @test id=certignarootca + * @bug 8314960 + * @summary Interoperability tests with Certigna Root CAs from Dhimyotis + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop certignarootca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop certignarootca CRL + */ + +/* + * @test id=affirmtrustcommercialca + * @bug 8040012 + * @summary Interoperability tests with AffirmTrust Commercial CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop affirmtrustcommercialca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop affirmtrustcommercialca CRL + */ + +/* + * @test id=affirmtrustnetworkingca + * @bug 8040012 + * @summary Interoperability tests with AffirmTrust Networking CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop affirmtrustnetworkingca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop affirmtrustnetworkingca CRL + */ + +/* + * @test id=affirmtrustpremiumca + * @bug 8040012 + * @summary Interoperability tests with AffirmTrust Premium CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop affirmtrustpremiumca CRL + */ + +/* + * @test id=affirmtrustpremiumeccca + * @bug 8040012 + * @summary Interoperability tests with AffirmTrust Premium ECC CA + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumeccca OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop affirmtrustpremiumeccca CRL + */ + +/* + * @test id=teliarootcav2 + * @bug 8317373 + * @summary Interoperability tests with Telia Root CA V2 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop teliarootcav2 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop teliarootcav2 CRL + */ + +/* + * @test id=emsignrootcag1 + * @bug 8319187 + * @summary Interoperability tests with eMudhra Root CA G1 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop emsignrootcag1 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop emsignrootcag1 CRL + */ + +/* + * @test id=emsigneccrootcag3 + * @bug 8319187 + * @summary Interoperability tests with eMudhra ECC Root CA G3 + * @library /test/lib + * @build jtreg.SkippedException ValidatePathWithURL CAInterop + * @run main/othervm -Djava.security.debug=certpath,ocsp CAInterop emsigneccrootcag3 OCSP + * @run main/othervm -Djava.security.debug=certpath CAInterop emsigneccrootcag3 CRL + */ + +/** + * Collection of certificate validation tests for interoperability with external CAs + */ +public class CAInterop { + + /** + * Returns the test configuration for CA + * + * @param alias from the cacerts file without [jdk] + * @return CATestURLs + */ + private CATestURLs getTestURLs(String alias) { + switch (alias) { + case "actalisauthenticationrootca": + return new CATestURLs("https://ssltest-active.actalis.it", + "https://ssltest-revoked.actalis.it"); + + case "amazonrootca1": + return new CATestURLs("https://valid.rootca1.demo.amazontrust.com", + "https://revoked.rootca1.demo.amazontrust.com"); + case "amazonrootca2": + return new CATestURLs("https://valid.rootca2.demo.amazontrust.com", + "https://revoked.rootca2.demo.amazontrust.com"); + case "amazonrootca3": + return new CATestURLs("https://valid.rootca3.demo.amazontrust.com", + "https://revoked.rootca3.demo.amazontrust.com"); + case "amazonrootca4": + return new CATestURLs("https://valid.rootca4.demo.amazontrust.com", + "https://revoked.rootca4.demo.amazontrust.com"); + + case "buypassclass2ca": + return new CATestURLs("https://valid.business.ca22.ssl.buypass.no", + "https://revoked.business.ca22.ssl.buypass.no"); + case "buypassclass3ca": + return new CATestURLs("https://valid.qcevident.ca23.ssl.buypass.no", + "https://revoked.qcevident.ca23.ssl.buypass.no"); + + case "comodorsaca": + return new CATestURLs("https://comodorsacertificationauthority-ev.comodoca.com", + "https://comodorsacertificationauthority-ev.comodoca.com:444"); + case "comodoeccca": + return new CATestURLs("https://comodoecccertificationauthority-ev.comodoca.com", + "https://comodoecccertificationauthority-ev.comodoca.com:444"); + case "usertrustrsaca": + return new CATestURLs("https://usertrustrsacertificationauthority-ev.comodoca.com", + "https://usertrustrsacertificationauthority-ev.comodoca.com:444"); + case "usertrusteccca": + return new CATestURLs("https://usertrustecccertificationauthority-ev.comodoca.com", + "https://usertrustecccertificationauthority-ev.comodoca.com:444"); + + case "letsencryptisrgx1": + return new CATestURLs("https://valid-isrgrootx1.letsencrypt.org", + "https://revoked-isrgrootx1.letsencrypt.org"); + case "letsencryptisrgx2": + return new CATestURLs("https://valid-isrgrootx2.letsencrypt.org", + "https://revoked-isrgrootx2.letsencrypt.org"); + + case "globalsignrootcar6": + return new CATestURLs("https://valid.r6.roots.globalsign.com", + "https://revoked.r6.roots.globalsign.com"); + + case "entrustrootcaec1": + return new CATestURLs("https://validec.entrust.net", + "https://revokedec.entrust.net"); + case "entrustrootcag4": + return new CATestURLs("https://validg4.entrust.net", + "https://revokedg4.entrust.net"); + + case "godaddyrootg2ca": + return new CATestURLs("https://valid.gdig2.catest.godaddy.com", + "https://revoked.gdig2.catest.godaddy.com"); + case "starfieldrootg2ca": + return new CATestURLs("https://valid.sfig2.catest.starfieldtech.com", + "https://revoked.sfig2.catest.starfieldtech.com"); + + case "globalsigneccrootcar4": + return new CATestURLs("https://good.gsr4.demo.pki.goog", + "https://revoked.gsr4.demo.pki.goog"); + case "gtsrootcar1": + return new CATestURLs("https://good.gtsr1.demo.pki.goog", + "https://revoked.gtsr1.demo.pki.goog"); + case "gtsrootcar2": + return new CATestURLs("https://good.gtsr2.demo.pki.goog", + "https://revoked.gtsr2.demo.pki.goog"); + case "gtsrootecccar3": + return new CATestURLs("https://good.gtsr3.demo.pki.goog", + "https://revoked.gtsr3.demo.pki.goog"); + case "gtsrootecccar4": + return new CATestURLs("https://good.gtsr4.demo.pki.goog", + "https://revoked.gtsr4.demo.pki.goog"); + + case "microsoftecc2017": + return new CATestURLs("https://acteccroot2017.pki.microsoft.com", + "https://rvkeccroot2017.pki.microsoft.com"); + case "microsoftrsa2017": + return new CATestURLs("https://actrsaroot2017.pki.microsoft.com", + "https://rvkrsaroot2017.pki.microsoft.com"); + + // Test URLs are listed at https://www.digicert.com/kb/digicert-root-certificates.htm + case "quovadisrootca1g3": + return new CATestURLs("https://quovadis-root-ca-1-g3.chain-demos.digicert.com", + "https://quovadis-root-ca-1-g3-revoked.chain-demos.digicert.com"); + case "quovadisrootca2g3": + return new CATestURLs("https://quovadis-root-ca-2-g3.chain-demos.digicert.com", + "https://quovadis-root-ca-2-g3-revoked.chain-demos.digicert.com"); + case "quovadisrootca3g3": + return new CATestURLs("https://quovadis-root-ca-3-g3.chain-demos.digicert.com", + "https://quovadis-root-ca-3-g3-revoked.chain-demos.digicert.com"); + case "digicerttlseccrootg5": + return new CATestURLs("https://digicert-tls-ecc-p384-root-g5.chain-demos.digicert.com", + "https://digicert-tls-ecc-p384-root-g5-revoked.chain-demos.digicert.com"); + case "digicerttlsrsarootg5": + return new CATestURLs("https://digicert-tls-rsa4096-root-g5.chain-demos.digicert.com", + "https://digicert-tls-rsa4096-root-g5-revoked.chain-demos.digicert.com"); + + case "sslrootrsaca": + return new CATestURLs("https://test-dv-rsa.ssl.com", + "https://revoked-rsa-dv.ssl.com"); + case "sslrootevrsaca": + return new CATestURLs("https://test-ev-rsa.ssl.com", + "https://revoked-rsa-ev.ssl.com"); + case "sslrooteccca": + return new CATestURLs("https://test-dv-ecc.ssl.com", + "https://revoked-ecc-dv.ssl.com"); + + case "teliasonerarootcav1": + return new CATestURLs("https://juolukka.cover.sonera.net:10443", + "https://juolukka.cover.sonera.net:10444"); + + case "twcaglobalrootca": + return new CATestURLs("https://evssldemo6.twca.com.tw", + "https://evssldemo7.twca.com.tw"); + + case "certignarootca": + return new CATestURLs("https://valid.servicesca.dhimyotis.com", + "https://revoked.servicesca.dhimyotis.com"); + + case "teliarootcav2": + return new CATestURLs("https://juolukka.cover.telia.fi:10600", + "https://juolukka.cover.telia.fi:10601"); + + // These are listed at https://www.affirmtrust.com/resources/ + case "affirmtrustcommercialca": + return new CATestURLs("https://validcommercial.affirmtrust.com", + "https://revokedcommercial.affirmtrust.com"); + case "affirmtrustnetworkingca": + return new CATestURLs("https://validnetworking.affirmtrust.com", + "https://revokednetworking.affirmtrust.com"); + case "affirmtrustpremiumca": + return new CATestURLs("https://validpremium.affirmtrust.com", + "https://revokedpremium.affirmtrust.com"); + case "affirmtrustpremiumeccca": + return new CATestURLs("https://validpremiumecc.affirmtrust.com", + "https://revokedpremiumecc.affirmtrust.com"); + + case "emsignrootcag1": + return new CATestURLs("https://testovg1.emsign.com/RootOVG1.html", + "https://testovg1r.emsign.com/RootOVG1MR.html"); + case "emsigneccrootcag3": + return new CATestURLs("https://testovg3.emsign.com/RootOVG3.html", + "https://testovg3r.emsign.com/RootOVG3MR.html"); + + default: throw new RuntimeException("No test setup found for: " + alias); + } + } + + public static void main(String[] args) throws Exception { + if (args.length < 2) { + throw new RuntimeException("Run as: CAInterop "); + } + + String caAlias = args[0]; + + CAInterop caInterop = new CAInterop(args[1]); + CATestURLs caTestURLs = caInterop.getTestURLs(caAlias); + + caInterop.validate(caAlias + " [jdk]", + caTestURLs.getVALID_URL(), + caTestURLs.getREVOKED_URL()); + } + + static class CATestURLs { + final String VALID_URL; + final String REVOKED_URL; + + public CATestURLs(String validURL, + String revokedURL) { + VALID_URL = validURL; + REVOKED_URL = revokedURL; + } + + public String getVALID_URL() { + return VALID_URL; + } + + public String getREVOKED_URL() { + return REVOKED_URL; + } + } + + /** + * Constructor for interoperability test with third party CA. + * + * @param revocationMode revocation checking mode to use + */ + public CAInterop(String revocationMode) { + if ("CRL".equalsIgnoreCase(revocationMode)) { + ValidatePathWithURL.enableCRLOnly(); + } else if ("OCSP".equalsIgnoreCase(revocationMode)) { + ValidatePathWithURL.enableOCSPOnly(); + } else { + // OCSP and CRL check by default + ValidatePathWithURL.enableOCSPAndCRL(); + } + + ValidatePathWithURL.logRevocationSettings(); + } + + /** + * Validates provided URLs using HttpsURLConnection making sure they + * anchor to the root CA found in cacerts using provided alias. + * + * @param caAlias CA alis from cacerts file + * @param validCertURL valid test URL + * @param revokedCertURL revoked test URL + * @throws Exception thrown when certificate can't be validated as valid or revoked + */ + public void validate(String caAlias, + String validCertURL, + String revokedCertURL) throws Exception { + + ValidatePathWithURL validatePathWithURL = new ValidatePathWithURL(caAlias); + + if (validCertURL != null) { + validatePathWithURL.validateDomain(validCertURL, false); + } + + if (revokedCertURL != null) { + validatePathWithURL.validateDomain(revokedCertURL, true); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaCA.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaCA.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8245654 8256895 + * @summary Interoperability tests with Certigna Root CAs from Dhimyotis + * @build ValidatePathWithParams + * @run main/othervm -Djava.security.debug=certpath CertignaCA OCSP + * @run main/othervm -Djava.security.debug=certpath CertignaCA CRL + */ +public class CertignaCA { + // Owner: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, + // OU=0002 48146308100036, O=DHIMYOTIS, C=FR + // Issuer: CN=Certigna, O=Dhimyotis, C=FR + // Serial number: 6f82fa28acd6f784bb5b120ba87367ad + // Valid from: Wed Nov 25 03:33:52 PST 2015 until: Sat Nov 22 03:33:52 PST 2025 + private static final String INT_CERTIGNA = "-----BEGIN CERTIFICATE-----\n" + + "MIIGFjCCBP6gAwIBAgIQb4L6KKzW94S7WxILqHNnrTANBgkqhkiG9w0BAQsFADA0\n" + + "MQswCQYDVQQGEwJGUjESMBAGA1UECgwJRGhpbXlvdGlzMREwDwYDVQQDDAhDZXJ0\n" + + "aWduYTAeFw0xNTExMjUxMTMzNTJaFw0yNTExMjIxMTMzNTJaMH0xCzAJBgNVBAYT\n" + + "AkZSMRIwEAYDVQQKDAlESElNWU9USVMxHDAaBgNVBAsMEzAwMDIgNDgxNDYzMDgx\n" + + "MDAwMzYxHTAbBgNVBGEMFE5UUkZSLTQ4MTQ2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DVQQKDAlEaGlteW90aXMxETAP\n" + + "BgNVBAMMCENlcnRpZ25hggkA/tzjAQ/JSP8wSQYDVR0gBEIwQDA+BgoqgXoBgTEB\n" + + "AAECMDAwLgYIKwYBBQUHAgEWImh0dHBzOi8vd3d3LmNlcnRpZ25hLmZyL2F1dG9y\n" + + "aXRlcy8wfAYIKwYBBQUHAQEEcDBuMDQGCCsGAQUFBzAChihodHRwOi8vYXV0b3Jp\n" + + "dGUuY2VydGlnbmEuZnIvY2VydGlnbmEuZGVyMDYGCCsGAQUFBzAChipodHRwOi8v\n" + + "YXV0b3JpdGUuZGhpbXlvdGlzLmNvbS9jZXJ0aWduYS5kZXIwYQYDVR0fBFowWDAp\n" + + "oCegJYYjaHR0cDovL2NybC5jZXJ0aWduYS5mci9jZXJ0aWduYS5jcmwwK6ApoCeG\n" + + "JWh0dHA6Ly9jcmwuZGhpbXlvdGlzLmNvbS9jZXJ0aWduYS5jcmwwDQYJKoZIhvcN\n" + + "AQELBQADggEBAGLft7gIuGPZVfg0cTM+HT2xAZFPDb/2+siH06x+dH044zMKbBIN\n" + + "bRzhKipwB1A3MW8FQjveE9tyrfyuqZE/X+o2SlGcdNV44ybYkxo4f6kcLEavV/IW\n" + + "+oFEnojZlhpksYcxrvQoEyqkAwshe8IS2KtZHKVACrt+XSs0lwvy7ALGmHaF7A4b\n" + + "y6cZWItA7Lhj8XWp+8tBJDj7HocRbWtxzEODdBuyMgJzFrNjc+97J0vH/K0+3yjm\n" + + "kczpKshMA0tM+MF9XDMN/MuwrPmUWGO/fHiqHgUp8yqeWtl1n44ZxkkK1t9GRwhn\n" + + "DWLv73/xhTmdhWYQ/reo0GbgBoLiltKmIJQ=\n" + + "-----END CERTIFICATE-----"; + + // Owner: SERIALNUMBER=S266241169, CN=valid.servicesca.dhimyotis.com, O=DHIMYOTIS, + // L=VILLENEUVE D'ASCQ, C=FR + // Issuer: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, OU=0002 + // 48146308100036, O=DHIMYOTIS, C=FR + // Serial number: c641ef7b0340c21515d8c462e729dc0e + // Valid from: Thu Mar 09 15:00:00 PST 2023 until: Mon Mar 11 15:59:59 PDT 2024 + private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + + "MIIIdzCCBl+gAwIBAgIRAMZB73sDQMIVFdjEYucp3A4wDQYJKoZIhvcNAQELBQAw\n" + + "fTELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURISU1ZT1RJUzEcMBoGA1UECwwTMDAw\n" + + "MiA0ODE0NjMwODEwMDAzNjEdMBsGA1UEYQwUTlRSRlItNDgxNDYzMDgxMDAwMzYx\n" + + "HTAbBgNVBAMMFENlcnRpZ25hIFNlcnZpY2VzIENBMB4XDTIzMDMwOTIzMDAwMFoX\n" + + "DTI0MDMxMTIyNTk1OVowezELMAkGA1UEBhMCRlIxGjAYBgNVBAcMEVZJTExFTkVV\n" + + "VkUgRCdBU0NRMRIwEAYDVQQKDAlESElNWU9USVMxJzAlBgNVBAMMHnZhbGlkLnNl\n" + + "cnZpY2VzY2EuZGhpbXlvdGlzLmNvbTETMBEGA1UEBRMKUzI2NjI0MTE2OTCCASIw\n" + + "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJDrFpZWEeBJoMUuG37wEmJ7XVeX\n" + + "Jde1bgURpFbLwifRj2TVmMdtfg9hXHL7B7Mh/+I8/e7kJz8mlU9qUYKyH24oAitE\n" + + "myXYHAKTydqTseiM3mp92n4PM+DrgsdbT7bpmiirNM0/sqWFNyGUz7kP6Z5E3uuU\n" + + "HSlzX1LBBj8S0ORNZWvomQho11gjuZJRS72X4XTnSc0DESwnLp2irUfx7pflBNt0\n" + + "sLE8BhpNSSQd91naJVKtCtn0H7df+o4gGBt2ZceCLBwU0NwN8+KXz06KjP8298V4\n" + + "P3+eR2QxAw4QBIanRaG6Gd4AmpdIaT7TpiYHotjrJ/Pbx5C8/cmgxxlmtI0CAwEA\n" + + "AaOCA/IwggPuMIHkBggrBgEFBQcBA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rba6PAZ85TbYhEdY\n" + + "FDNm7F7CVPU67HV5gE2kDa3Jprd1SjwO095LsRptWhzxUByhee3JI0jljBTaKowy\n" + + "jPv8oekm7zqCLzY=\n" + + "-----END CERTIFICATE-----"; + + // Owner: SERIALNUMBER=S266251168, CN=revoked.servicesca.certigna.com, O=DHIMYOTIS, + // L=VILLENEUVE D'ASCQ, C=FR + // Issuer: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, OU=0002 + // 48146308100036, O=DHIMYOTIS, C=FR + // Serial number: e863f752a23a735e3ccf958abf18565b + // Valid from: Thu Mar 09 15:00:00 PST 2023 until: Fri Mar 08 14:59:59 PST 2024 + private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + + "MIIIezCCBmOgAwIBAgIRAOhj91KiOnNePM+Vir8YVlswDQYJKoZIhvcNAQELBQAw\n" + + "fTELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURISU1ZT1RJUzEcMBoGA1UECwwTMDAw\n" + + "MiA0ODE0NjMwODEwMDAzNjEdMBsGA1UEYQwUTlRSRlItNDgxNDYzMDgxMDAwMzYx\n" + + "HTAbBgNVBAMMFENlcnRpZ25hIFNlcnZpY2VzIENBMB4XDTIzMDMwOTIzMDAwMFoX\n" + + "DTI0MDMwODIyNTk1OVowfDELMAkGA1UEBhMCRlIxGjAYBgNVBAcMEVZJTExFTkVV\n" + + "VkUgRCdBU0NRMRIwEAYDVQQKDAlESElNWU9USVMxKDAmBgNVBAMMH3Jldm9rZWQu\n" + + "c2VydmljZXNjYS5jZXJ0aWduYS5jb20xEzARBgNVBAUTClMyNjYyNTExNjgwggEi\n" + + "MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCBqKNjMkHqJ9EQa3CjuZ6EYMz6\n" + + "mWODrEucRcJDihYMigaV1oRyquGlFQ82ootXaK5bU+EYSMmUwbRpdZ9G/oZUn2+K\n" + + "MKAFDI+MoZoFhQC+2w0AzJycCf/hShUVxcRREKRKdfzv+k5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VYns\n" + + "WQrslxoCBor6CL6AYMQz3jbzQ0soD3Reb11+uTngWGJZtx4DT09RFB3a+1rcYjiS\n" + + "ijCBB+Lqx0xfLQnfBv1A0wjNqUY+gyEe0SpXqB4edqy5uaqawRRKMuNSnb2BVz0/\n" + + "keo1Kif/GSak+JUBpJ8hkJWygtrWCETUNfoseQhqo3gism0EGxJ04tBp+DRvfbrz\n" + + "X4aBgALRro3jSIR1Ibp+e0fxePwShy715SF2H4SfjvplTAKq5bwztZtQUkPR6fJ7\n" + + "5xT0f762c1yytKP1rHFMvzl6k7QWvC6zb2FeG5UqXJw3wFxxWsCuAUu5SPFfXdno\n" + + "5lIHTTV5rpZBN+PzTZsz\n" + + "-----END CERTIFICATE-----"; + + public static void main(String[] args) throws Exception { + + // Added to test for JDK-8256895 + System.setProperty("jdk.security.certpath.ocspNonce", "true"); + + // OCSP check by default + boolean ocspEnabled = args.length < 1 || !"CRL".equalsIgnoreCase(args[0]); + + ValidatePathWithParams pathValidator; + String[] validChainToValidate; + String[] revChainToValidate; + + if (!ocspEnabled) { + pathValidator = new ValidatePathWithParams(null); + pathValidator.enableCRLCheck(); + + validChainToValidate = new String[]{VALID, INT_CERTIGNA}; + revChainToValidate = new String[]{REVOKED, INT_CERTIGNA}; + } else { + // int certificate doesn't specify OCSP responder + pathValidator = new ValidatePathWithParams(new String[]{INT_CERTIGNA}); + pathValidator.enableOCSPCheck(); + + validChainToValidate = new String[]{VALID}; + revChainToValidate = new String[]{REVOKED}; + } + + // Validate valid + pathValidator.validate(validChainToValidate, + ValidatePathWithParams.Status.GOOD, null, System.out); + + // Validate Revoked + pathValidator.validate(revChainToValidate, + ValidatePathWithParams.Status.REVOKED, + "Fri Mar 10 03:39:51 PST 2023", System.out); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaRoots.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaRoots.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaRoots.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaRoots.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,293 +0,0 @@ -/* - * Copyright (c) 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8245654 8314960 - * @summary Interoperability tests with Certigna Root CAs from Dhimyotis - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath CertignaRoots OCSP - * @run main/othervm -Djava.security.debug=certpath CertignaRoots CRL - */ - -/* - * Obtain TLS test artifacts for Certigna Root CAs from: - * - * Valid TLS Certificates: - * https://valid.servicesca.dhimyotis.com/ - * - * Revoked TLS Certificates: - * https://revoked.servicesca.dhimyotis.com/ - */ -public class CertignaRoots { - - // Owner: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, - // OU=0002 48146308100036, O=DHIMYOTIS, C=FR - // Issuer: CN=Certigna Root CA, OU=0002 48146308100036, O=Dhimyotis, C=FR - // Serial number: fd30cf04344fc38dd90c4e70753d0623 - // Valid from: Wed Nov 25 03:37:21 PST 2015 until: Fri Jun 03 04:37:21 PDT 2033 - private static final String INT_CERTIGNA_ROOT_CA = "-----BEGIN CERTIFICATE-----\n" + - "MIIHETCCBPmgAwIBAgIRAP0wzwQ0T8ON2QxOcHU9BiMwDQYJKoZIhvcNAQELBQAw\n" + - "WjELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAw\n" + - "MiA0ODE0NjMwODEwMDAzNjEZMBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0x\n" + - "NTExMjUxMTM3MjFaFw0zMzA2MDMxMTM3MjFaMH0xCzAJBgNVBAYTAkZSMRIwEAYD\n" + - "VQQKDAlESElNWU9USVMxHDAaBgNVBAsMEzAwMDIgNDgxNDYzMDgxMDAwMzYxHTAb\n" + - "BgNVBGEMFE5UUkZSLTQ4MTQ2MzA4MTAwMDM2MR0wGwYDVQQDDBRDZXJ0aWduYSBT\n" + - "ZXJ2aWNlcyBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALPM+7Lp\n" + - "WBz9wFcPaTc3xnB+5g0XrnptB0EPPfrR04vO52Ykm4ky1d4ZLd10tbM1fa1RqNSO\n" + - "VWWg93O4pL7zCFKlz6JV74ZZVhHpEAwzBwv2oPnxvVbxtSN67xsSY66ahUYxjzs8\n" + - "+3FhmsiRxqwnTYvK2u70uglUvRisOKyTL/M6JnrC4y8tlmoz7OSa5BmBMVplJFQt\n" + - "vmON6N9aHLvYMz+EyJPCbXL6pELxeHjFT5QmIaRamsr2DOTaCjtBZKI1Wnh3X7ln\n" + - "bjM8MESJiV2t7E9tIQNG0Z/HI3tO4aaUMum3KysY5sC8v3vi7rryGidgzHQhrtP0\n" + - "ZXWW5UH/k7umLS/P/XXWnCFpc2Lxa1uDGfc2im7xibRoPP+JNZszN76euFlls6jy\n" + - "EXAiwnVr14tVVTewLK0OWs5SJHpEKp8PGMZRDj59EmMvokWwzL6QzNZ6vVAp00oO\n" + - "m05sbspNY9+MFqGKKUsK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MddeHr7sDqvs7R1tSS5hoASLtdQhO7oxUzr3m7M8q\n" + - "+lh4jszli+cjfiPUVS2ADFu4ccQIh4OsIX6SWdU+8R+c/fn0FV6ip4SAVbNyCToz\n" + - "0ZbZKO8YTJgORxRmvrop9dPyuLWjaRrZ0LMx4a3EM3sQDPDqmsG0lHtfFj2PiJvq\n" + - "4lEYA+gDiLKODI+3DJMqo559m3QSS52DsShomHX/Txd0lJoZwepCE6X4KkG9FHjV\n" + - "WXyLgYFwCOcn+hkLhdpblms0wtjeSPITGOioSkefzhleJnDgJ9X4M3svd0HLTpJi\n" + - "lC1DmDZgdrXWITVdOoCogr2LFKNiGd0tbpKG533eKpfBALlm+afc6j73p1KhJEAn\n" + - "AfydDZqBRqv6+HHYplNDn/K2I1CZdkwaGrx3HOR/voGUi1sUI+hYbsPAFu8ZxrhD\n" + - "9UiysmLCfEUhqkbojony+L2mKsoLqyd24emQzn7GgMa7emlWX2jQUTwrD4SliZ2u\n" + - "OetVaZX5RLyqJWs4Igo/xye0xtMQN8INJ4hSZvnMQ1qFtuSRcQ==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, - // OU=0002 48146308100036, O=DHIMYOTIS, C=FR - // Issuer: CN=Certigna, O=Dhimyotis, C=FR - // Serial number: 6f82fa28acd6f784bb5b120ba87367ad - // Valid from: Wed Nov 25 03:33:52 PST 2015 until: Sat Nov 22 03:33:52 PST 2025 - private static final String INT_CERTIGNA = "-----BEGIN CERTIFICATE-----\n" + - "MIIGFjCCBP6gAwIBAgIQb4L6KKzW94S7WxILqHNnrTANBgkqhkiG9w0BAQsFADA0\n" + - "MQswCQYDVQQGEwJGUjESMBAGA1UECgwJRGhpbXlvdGlzMREwDwYDVQQDDAhDZXJ0\n" + - "aWduYTAeFw0xNTExMjUxMTMzNTJaFw0yNTExMjIxMTMzNTJaMH0xCzAJBgNVBAYT\n" + - "AkZSMRIwEAYDVQQKDAlESElNWU9USV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DVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF\n" + - "9lo53BGhOKQ2MDQxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAP\n" + - "BgNVBAMMCENlcnRpZ25hggkA/tzjAQ/JSP8wSQYDVR0gBEIwQDA+BgoqgXoBgTEB\n" + - "AAECMDAwLgYIKwYBBQUHAgEWImh0dHBzOi8vd3d3LmNlcnRpZ25hLmZyL2F1dG9y\n" + - "aXRlcy8wfAYIKwYBBQUHAQEEcDBuMDQGCCsGAQUFBzAChihodHRwOi8vYXV0b3Jp\n" + - "dGUuY2VydGlnbmEuZnIvY2VydGlnbmEuZGVyMDYGCCsGAQUFBzAChipodHRwOi8v\n" + - "YXV0b3JpdGUuZGhpbXlvdGlzLmNvbS9jZXJ0aWduYS5kZXIwYQYDVR0fBFowWDAp\n" + - "oCegJYYjaHR0cDovL2NybC5jZXJ0aWduYS5mci9jZXJ0aWduYS5jcmwwK6ApoCeG\n" + - "JWh0dHA6Ly9jcmwuZGhpbXlvdGlzLmNvbS9jZXJ0aWduYS5jcmwwDQYJKoZIhvcN\n" + - "AQELBQADggEBAGLft7gIuGPZVfg0cTM+HT2xAZFPDb/2+siH06x+dH044zMKbBIN\n" + - "bRzhKipwB1A3MW8FQjveE9tyrfyuqZE/X+o2SlGcdNV44ybYkxo4f6kcLEavV/IW\n" + - "+oFEnojZlhpksYcxrvQoEyqkAwshe8IS2KtZHKVACrt+XSs0lwvy7ALGmHaF7A4b\n" + - "y6cZWItA7Lhj8XWp+8tBJDj7HocRbWtxzEODdBuyMgJzFrNjc+97J0vH/K0+3yjm\n" + - "kczpKshMA0tM+MF9XDMN/MuwrPmUWGO/fHiqHgUp8yqeWtl1n44ZxkkK1t9GRwhn\n" + - "DWLv73/xhTmdhWYQ/reo0GbgBoLiltKmIJQ=\n" + - "-----END CERTIFICATE-----"; - - // Owner: SERIALNUMBER=S266241169, CN=valid.servicesca.dhimyotis.com, O=DHIMYOTIS, - // L=VILLENEUVE D'ASCQ, C=FR - // Issuer: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, OU=0002 - // 48146308100036, O=DHIMYOTIS, C=FR - // Serial number: c641ef7b0340c21515d8c462e729dc0e - // Valid from: Thu Mar 09 15:00:00 PST 2023 until: Mon Mar 11 15:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIIdzCCBl+gAwIBAgIRAMZB73sDQMIVFdjEYucp3A4wDQYJKoZIhvcNAQELBQAw\n" + - "fTELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURISU1ZT1RJUzEcMBoGA1UECwwTMDAw\n" + - "MiA0ODE0NjMwODEwMDAzNjEdMBsGA1UEYQwUTlRSRlItNDgxNDYzMDgxMDAwMzYx\n" + - "HTAbBgNVBAMMFENlcnRpZ25hIFNlcnZpY2VzIENBMB4XDTIzMDMwOTIzMDAwMFoX\n" + - "DTI0MDMxMTIyNTk1OVowezELMAkGA1UEBhMCRlIxGjAYBgNVBAcMEVZJTExFTkVV\n" + - "VkUgRCdBU0NRMRIwEAYDVQQKDAlESElNWU9USVMxJzAlBgNVBAMMHnZhbGlkLnNl\n" + - "cnZpY2VzY2EuZGhpbXlvdGlzLmNvbTETMBEGA1UEBRMKUzI2NjI0MTE2OTCCASIw\n" + - "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJDrFpZWEeBJoMUuG37wEmJ7XVeX\n" + - "Jde1bgURpFbLwifRj2TVmMdtfg9hXHL7B7Mh/+I8/e7kJz8mlU9qUYKyH24oAitE\n" + - "myXYHAKTydqTseiM3mp92n4PM+DrgsdbT7bpmiirNM0/sqWFNyGUz7kP6Z5E3uuU\n" + - "HSlzX1LBBj8S0ORNZWvomQho11gjuZJRS72X4XTnSc0DESwnLp2irUfx7pflBNt0\n" + - "sLE8BhpNSSQd91naJVKtCtn0H7df+o4gGBt2ZceCLBwU0NwN8+KXz06KjP8298V4\n" + - "P3+eR2QxAw4QBIanRaG6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AE5srKa7MWU8Mmku2vuX95lupJo4LmD\n" + - "zOsihH00hyhtHFUB1TGXuaf77kFsipE6iycyxpcrpJ1UAWiZrba6PAZ85TbYhEdY\n" + - "FDNm7F7CVPU67HV5gE2kDa3Jprd1SjwO095LsRptWhzxUByhee3JI0jljBTaKowy\n" + - "jPv8oekm7zqCLzY=\n" + - "-----END CERTIFICATE-----"; - - // Owner: SERIALNUMBER=S266251168, CN=revoked.servicesca.certigna.com, O=DHIMYOTIS, - // L=VILLENEUVE D'ASCQ, C=FR - // Issuer: CN=Certigna Services CA, OID.2.5.4.97=NTRFR-48146308100036, OU=0002 - // 48146308100036, O=DHIMYOTIS, C=FR - // Serial number: e863f752a23a735e3ccf958abf18565b - // Valid from: Thu Mar 09 15:00:00 PST 2023 until: Fri Mar 08 14:59:59 PST 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIIezCCBmOgAwIBAgIRAOhj91KiOnNePM+Vir8YVlswDQYJKoZIhvcNAQELBQAw\n" + - "fTELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURISU1ZT1RJUzEcMBoGA1UECwwTMDAw\n" + - "MiA0ODE0NjMwODEwMDAzNjEdMBsGA1UEYQwUTlRSRlItNDgxNDYzMDgxMDAwMzYx\n" + - "HTAbBgNVBAMMFENlcnRpZ25hIFNlcnZpY2VzIENBMB4XDTIzMDMwOTIzMDAwMFoX\n" + - "DTI0MDMwODIyNTk1OVowfDELMAkGA1UEBhMCRlIxGjAYBgNVBAcMEVZJTExFTkVV\n" + - "VkUgRCdBU0NRMRIwEAYDVQQKDAlESElNWU9USVMxKDAmBgNVBAMMH3Jldm9rZWQu\n" + - "c2VydmljZXNjYS5jZXJ0aWduYS5jb20xEzARBgNVBAUTClMyNjYyNTExNjgwggEi\n" + - "MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCBqKNjMkHqJ9EQa3CjuZ6EYMz6\n" + - "mWODrEucRcJDihYMigaV1oRyquGlFQ82ootXa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9P2M+l2WpyREUK\n" + - "l7qHwTsrlMmNb8n44zGtY4wL9NSYWTdTfhcU0FAPdPcLlnjoQubJ1O0vPkzfVYns\n" + - "WQrslxoCBor6CL6AYMQz3jbzQ0soD3Reb11+uTngWGJZtx4DT09RFB3a+1rcYjiS\n" + - "ijCBB+Lqx0xfLQnfBv1A0wjNqUY+gyEe0SpXqB4edqy5uaqawRRKMuNSnb2BVz0/\n" + - "keo1Kif/GSak+JUBpJ8hkJWygtrWCETUNfoseQhqo3gism0EGxJ04tBp+DRvfbrz\n" + - "X4aBgALRro3jSIR1Ibp+e0fxePwShy715SF2H4SfjvplTAKq5bwztZtQUkPR6fJ7\n" + - "5xT0f762c1yytKP1rHFMvzl6k7QWvC6zb2FeG5UqXJw3wFxxWsCuAUu5SPFfXdno\n" + - "5lIHTTV5rpZBN+PzTZsz\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - // OCSP check by default - boolean ocspEnabled = args.length < 1 || !"CRL".equalsIgnoreCase(args[0]); - - // CN=Certigna - new CertignaCAs().runTest(ocspEnabled, - VALID, - REVOKED, - INT_CERTIGNA); - - // CN=Certigna Root CA - new CertignaCAs().runTest(ocspEnabled, - VALID, - REVOKED, - INT_CERTIGNA_ROOT_CA); - } -} - -class CertignaCAs { - public void runTest(boolean ocspEnabled, - final String VALID, - final String REVOKED, - final String INT_CERT) throws Exception { - - ValidatePathWithParams pathValidator; - String[] validChainToValidate; - String[] revChainToValidate; - - if (!ocspEnabled) { - pathValidator = new ValidatePathWithParams(null); - pathValidator.enableCRLCheck(); - - validChainToValidate = new String[]{VALID, INT_CERT}; - revChainToValidate = new String[]{REVOKED, INT_CERT}; - } else { - // int certificate doesn't specify OCSP responder - pathValidator = new ValidatePathWithParams(new String[]{INT_CERT}); - pathValidator.enableOCSPCheck(); - - validChainToValidate = new String[]{VALID}; - revChainToValidate = new String[]{REVOKED}; - } - - // Validate valid - pathValidator.validate(validChainToValidate, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(revChainToValidate, - ValidatePathWithParams.Status.REVOKED, - "Fri Mar 10 03:39:51 PST 2023", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,643 +0,0 @@ -/* - * Copyright (c) 2017, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* - * @test - * @bug 8189131 8231887 - * @summary Interoperability tests with Comodo RSA, ECC, userTrust RSA, and - * userTrust ECC CAs - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath ComodoCA OCSP - * @run main/othervm -Djava.security.debug=certpath ComodoCA CRL - */ - - /* - * Obtain TLS test artifacts for Comodo CAs from: - * - * Valid TLS Certificates: - * https://comodorsacertificationauthority-ev.comodoca.com - * https://comodoecccertificationauthority-ev.comodoca.com - * https://usertrustrsacertificationauthority-ev.comodoca.com - * https://usertrustecccertificationauthority-ev.comodoca.com - * - * Revoked TLS Certificates: - * https://comodorsacertificationauthority-ev.comodoca.com:444 - * https://comodoecccertificationauthority-ev.comodoca.com:444 - * https://usertrustrsacertificationauthority-ev.comodoca.com:444 - * https://usertrustecccertificationauthority-ev.comodoca.com:444 - */ -public class ComodoCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new ComodoRSA().runTest(pathValidator); - new ComodoECC().runTest(pathValidator); - new ComodoUserTrustRSA().runTest(pathValidator); - new ComodoUserTrustECC().runTest(pathValidator); - } -} - -class ComodoRSA { - - // Owner: CN=COMODO RSA Extended Validation Secure Server CA, - // O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB - // Issuer: CN=COMODO RSA Certification Authority, O=COMODO CA Limited, - // L=Salford, ST=Greater Manchester, C=GB - // Serial number: 6a74380d4ebfed435b5a3f7e16abdd8 - // Valid from: Sat Feb 11 16:00:00 PST 2012 until: Thu Feb 11 15:59:59 PST 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" - + "MIIGDjCCA/agAwIBAgIQBqdDgNTr/tQ1taP34Wq92DANBgkqhkiG9w0BAQwFADCB\n" - + "hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\n" - + "A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV\n" - + "BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTIwMjEy\n" - + "MDAwMDAwWhcNMjcwMjExMjM1OTU5WjCBkjELMAkGA1UEBhMCR0IxGzAZBgNVBAgT\n"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TU9ET1JTQUFkZFRydXN0Q0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2Nz\n" - + "cC5jb21vZG9jYS5jb20wDQYJKoZIhvcNAQEMBQADggIBAERCnUFRK0iIXZebeV4R\n" - + "AUpSGXtBLMeJPNBy3IX6WK/VJeQT+FhlZ58N/1eLqYVeyqZLsKeyLeCMIs37/3mk\n" - + "jCuN/gI9JN6pXV/kD0fQ22YlPodHDK4ixVAihNftSlka9pOlk7DgG4HyVsTIEFPk\n" - + "1Hax0VtpS3ey4E/EhOfUoFDuPPpE/NBXueEoU/1Tzdy5H3pAvTA/2GzS8+cHnx8i\n" - + "teoiccsq8FZ8/qyo0QYPFBRSTP5kKwxpKrgNUG4+BAe/eiCL+O5lCeHHSQgyPQ0o\n" - + "fkkdt0rvAucNgBfIXOBhYsvss2B5JdoaZXOcOBCgJjqwyBZ9kzEi7nQLiMBciUEA\n" - + "KKlHMd99SUWa9eanRRrSjhMQ34Ovmw2tfn6dNVA0BM7pINae253UqNpktNEvWS5e\n" - + "ojZh1CSggjMziqHRbO9haKPl0latxf1eYusVqHQSTC8xjOnB3xBLAer2VBvNfzu9\n" - + "XJ/B288ByvK6YBIhMe2pZLiySVgXbVrXzYxtvp5/4gJYp9vDLVj2dAZqmvZh+fYA\n" - + "tmnYOosxWd2R5nwnI4fdAw+PKowegwFOAWEMUnNt/AiiuSpm5HZNMaBWm9lTjaK2\n" - + "jwLI5jqmBNFI+8NKAnb9L9K8E7bobTQk+p0pisehKxTxlgBzuRPpwLk6R1YCcYAn\n" - + "pLwltum95OmYdBbxN4SBB7SC\n" - + "-----END CERTIFICATE-----"; - - // Owner: CN=comodorsacertificationauthority-ev.comodoca.com, - // O=Sectigo Limited, STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, - // L=Salford, ST=Manchester, OID.2.5.4.17=M5 3EQ, C=GB, OID.2.5.4.15=Private Organization, - // OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=COMODO RSA Extended Validation Secure Server CA, O=COMODO CA Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: 9eb246629030e0b527ca2f93e5ebf25a - // Valid from: Mon Mar 01 16:00:00 PST 2021 until: Sat Apr 02 16:59:59 PDT 2022 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHSzCCBjOgAwIBAgIRAJ6yRmKQMOC1J8ovk+Xr8lowDQYJKoZIhvcNAQELBQAw\n" + - "gZIxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO\n" + - "BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTgwNgYD\n" + - "VQQDEy9DT01PRE8gUlNBIEV4dGVuZGVkIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZl\n" + - "ciBDQTAeFw0yMTAzMDIwMDAwMDBaFw0yMjA0MDIyMzU5NTlaMIIBNzERMA8GA1UE\n" + - "BRMIMDQwNTg2OTAxEzARBgsrBgEEAYI3PAIBAxMCR0IxHTAbBgNVBA8TFFByaXZh\n" + - "dGUgT3JnYW5pemF0aW9uMQswCQYDVQQGEwJHQjEPMA0GA1UEERMGTTUgM0VRMRMw\n" + - "EQYDVQQIEwpNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRYwFAYDVQQJEw1U\n" + - "cmFmZm9yZCBSb2FkMRYwFAYDVQQJEw1FeGNoYW5nZSBRdWF5MSUwIwYDVQQJExwz\n" + - "cmQgRmxvb3IsIDI2IE9mZmljZSBWaWxsYWdlMRgwFgYDVQQKEw9TZWN0aWdvIExp\n" + - "bWl0ZWQxODA2BgNVBAMTL2NvbW9kb3JzYWNlcnRpZmljYXRpb25hdXRob3JpdHkt\n" + - "ZXYuY29tb2RvY2EuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\n" + - "0P95lAFOOkEOy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eS1ldi5jb21vZG9jYS5jb20wggEEBgorBgEEAdZ5\n" + - "AgQCBIH1BIHyAPAAdgBGpVXrdfqRIDC1oolp9PN9ESxBdL79SbiFq/L8cP5tRwAA\n" + - "AXfyqEfyAAAEAwBHMEUCIQDJbHPgbqK21/Nugwl5mgMO81YQSHOm4VcQ8UvOJjnN\n" + - "JQIgWw9fortwJBtv2Mts6xJYr5D6itPpEYP8uegURneBwRsAdgBvU3asMfAxGdiZ\n" + - "AKRRFf93FRwR2QLBACkGjbIImjfZEwAAAXfyqEjyAAAEAwBHMEUCIDifAsuw37D4\n" + - "beHZ9Ed5/Pab0Eg6Cobrh4jv3bjfA6KIAiEAmiA/XD+AccfI85c+C2zH9wNIs+Zm\n" + - "/V/uo/sv0i9eCAYwDQYJKoZIhvcNAQELBQADggEBADRFnOFgb3mzCUpXxiU5/mM5\n" + - "ECRj3NzXKXjcYlSMhVcWA7Eqa5rhJuh11vbPoDQzQcGxntS/zhRwJFRF3hnyFa3m\n" + - "4t+7ZnUaJN+GOMTABh4kYiOSpE9id12URdJzWv2IHg4CU3OLnsBHGh7H9eWfbPvn\n" + - "OW4owV1ChpiEHh40i/NQkTn9JzjlZepI9+EsSdhn2tpis7tko6PX/plgw8bRgm7f\n" + - "ong2QaX/DE6z4VIdomW8TQhB9turhKxwjzPTbtYDQIgZfRP/H1S5jYutqbE5yL5B\n" + - "r+VOiSuB8234P4xWg1IBL2EFbxPdgOSMTWRJutUcj44kJKmwp5GUQtySSccw4gk=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=comodorsacertificationauthority-ev.comodoca.com, OU=COMODO EV SGC SSL, - // O=Sectigo Limited, STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, - // L=Salford, OID.2.5.4.17=M5 3EQ, C=GB, OID.2.5.4.15=Private Organization, - // OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=COMODO RSA Extended Validation Secure Server CA, O=COMODO CA Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: a0c7cabcc25ed9358ded02cc1d485545 - // Valid from: Sun Sep 29 17:00:00 PDT 2019 until: Tue Dec 28 15:59:59 PST 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIH0TCCBrmgAwIBAgIRAKDHyrzCXtk1je0CzB1IVUUwDQYJKoZIhvcNAQELBQAw\n" + - "gZIxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO\n" + - "BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTgwNgYD\n" + - "VQQDEy9DT01PRE8gUlNBIEV4dGVuZGVkIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZl\n" + - "ciBDQTAeFw0xOTA5MzAwMDAwMDBaFw0yMTEyMjgyMzU5NTlaMIIBPjERMA8GA1UE\n" + - "BRMIMDQwNTg2OTAxEzARBgsrBgEEAYI3PAIBAxMCR0IxHTAbBgNVBA8TFFByaXZh\n" + - "dGUgT3JnYW5pemF0aW9uMQswCQYDVQQGEwJHQjEPMA0GA1UEERMGTTUgM0VRMRAw\n" + - "DgYDVQQHEwdTYWxmb3JkMRYwFAYDVQQJEw1UcmFmZm9yZCBSb2FkMRYwFAYDVQQJ\n" + - "Ew1FeGNoYW5nZSBRdWF5MSUwIwYDVQQJExwzcmQgRmxvb3IsIDI2IE9mZmljZSBW\n" + - "aWxsYWdlMRgwFgYDVQQKEw9TZWN0aWdvIExpbWl0ZWQxGjAYBgNVBAsTEUNPTU9E\n" + - "TyBFViBTR0MgU1NMMTgwNgYDVQQDEy9jb21vZG9yc2FjZXJ0aWZpY2F0aW9uYXV0\n" + - "aG9yaXR5LWV2LmNvbW9kb2NhLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\n" + - "AQoCggEBAND/eZQBTjpBDsuteKwl+zpTitF8tJzwHAhcQHC2AaLF/GJl1rn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YKKwYBBAHWeQIEAgSCAW0EggFpAWcAdQDuS723dc5guuFCaR+r4Z5mow9+\n" + - "X7By2IMAxHuJeqj9ywAAAW2DAXefAAAEAwBGMEQCIDqP1einOiPHnaG1fOZMDrEc\n" + - "RAxjq3vEl94fp4pkmke7AiBsJOvPE6irgcOO1/lnP7NRuln7iPJjU7T20PEK5/rm\n" + - "KwB2AFWB1MIWkDYBSuoLm1c8U/DA5Dh4cCUIFy+jqh0HE9MMAAABbYMBd0kAAAQD\n" + - "AEcwRQIhALgUI5XxM1NHbJDdr19h2pe3LhzK4tpuB/OQ9BgCyrGXAiBdr6mNCB/G\n" + - "rbdVx0u7iezwC7mq7iaWugR3rrWlSA8fWQB2ALvZ37wfinG1k5Qjl6qSe0c4V5UK\n" + - "q1LoGpCWZDaOHtGFAAABbYMBd1oAAAQDAEcwRQIgXbG32dagMeLhuZb+LSpJO1vI\n" + - "BmxmRnNdiz5FbG9cCbwCIQCr1X9f+ebT5fhlDUNBURUorTtM8QQciBiueBqvHk7+\n" + - "1DANBgkqhkiG9w0BAQsFAAOCAQEAM/A/1dgoc5NP1n+w3SX9qWcN7QT7ExdrnZSl\n" + - "Ygn0PF2fx4gz7cvNKucbpQJNA4C9awGydyYK8/o5KDUXt3K7eb1OAZ/NZBjygsJs\n" + - "ikXvxlBh8oEoqBOfOtr24l0NGUWnP8Qeu/VPcIMER4V8qX+in0pCXkSd67nkp6Bs\n" + - "EcqhDPgmzdSC1gQHsZuBdotG14OfdH1cG1bRK6GadISLG1h8BFukVem42B149v8F\n" + - "MCIUQAYprAVv2WlTZKBx9XzuK6IK3+klHZ07Jfvjvt7PPG5HKSMWBMnMaTHKcyQI\n" + - "G3t91yw7BnNNInZlBSsFtqjbHhDcr7uruZdbi0rerSsi2qDr0w==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 02 02:51:39 PST 2021", System.out); - } -} - -class ComodoECC { - - // Owner: CN=COMODO ECC Extended Validation Secure Server CA, - // O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB - // Issuer: CN=COMODO ECC Certification Authority, O=COMODO CA Limited, - // L=Salford, ST=Greater Manchester, C=GB - // Serial number: 61d4643b412b5d8d715499d8553aa03 - // Valid from: Sun Apr 14 17:00:00 PDT 2013 until: Fri Apr 14 16:59:59 PDT 2028 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" - + "MIIDojCCAyigAwIBAgIQBh1GQ7QStdjXFUmdhVOqAzAKBggqhkjOPQQDAzCBhTEL\n" - + "MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE\n" - + "BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT\n" - + "IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTMwNDE1MDAw\n" - + "MDAwWhcNMjgwNDE0MjM1OTU5WjCBkjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy\n" - + "ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N\n" - + "T0RPIENBIExpbWl0ZWQxODA2BgNVBAMTL0NPTU9ETyBFQ0MgRXh0ZW5kZWQgVmFs\n" - + "aWRhdGlvbiBTZWN1cmUgU2VydmVyIENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\n" - + "QgAEV3AaPyeTQy0aWXXkBJMR42DsJ5pnbliJe7ndaHzCDslVlY8ofpxeFiqluZrK\n" - + "KNcJeBU/Jl1YI9jLMyMZKsfSoaOCAWkwggFlMB8GA1UdIwQYMBaAFHVxpxlIGbyd\n" - + "nepBR9+UxEh3mdN5MB0GA1UdDgQWBBTTTsMZulhZ0Rxgt2FTRzund4/4ijAOBgNV\n" - + "HQ8BAf8EBAMCAYYwEgYDVR0TAQH/BAgwBgEB/wIBADA+BgNVHSAENzA1MDMGBFUd\n" - + "IAAwKzApBggrBgEFBQcCARYdaHR0cHM6Ly9zZWN1cmUuY29tb2RvLmNvbS9DUFMw\n" - + "TAYDVR0fBEUwQzBBoD+gPYY7aHR0cDovL2NybC5jb21vZG9jYS5jb20vQ09NT0RP\n" - + "RUNDQ2VydGlmaWNhdGlvbkF1dGhvcml0eS5jcmwwcQYIKwYBBQUHAQEEZTBjMDsG\n" - + "CCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9DT01PRE9FQ0NBZGRU\n" - + "cnVzdENBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t\n" - + "MAoGCCqGSM49BAMDA2gAMGUCMQDmPWS98nREWdt4xB83r9MVvgG5INpKHi6V1dUY\n" - + "lCqvSvXXjK0QvZSrOB7cj9RavGgCMG2xJNG+SvlTWEYpmK7eXSgmRUgoBDeQ0yDK\n" - + "lnxmeeOBnnCaDIxAcA3aCj2Gtdt3sA==\n" - + "-----END CERTIFICATE-----"; - - // Owner: CN=comodoecccertificationauthority-ev.comodoca.com, O=Sectigo Limited, STREET="3rd Floor, - // 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, L=Salford, ST=Manchester, OID.2.5.4.17=M5 3EQ, - // C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=COMODO ECC Extended Validation Secure Server CA, O=COMODO CA Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: db437a31e5be29a62443e3caa1479001 - // Valid from: Mon Mar 01 16:00:00 PST 2021 until: Sat Apr 02 16:59:59 PDT 2022 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFvz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7xw98ELmK/LEk1b5KSlqoO8sFHgwQ8vI=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=comodoecccertificationauthority-ev.comodoca.com, OU=COMODO EV SSL, O=Sectigo Limited, - // STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, L=Salford, OID.2.5.4.17=M5 3EQ, - // C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=COMODO ECC Extended Validation Secure Server CA, O=COMODO CA Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: 7972d9d8472a2d52ad1ee6edfb16cbe1 - // Valid from: Sun Sep 29 17:00:00 PDT 2019 until: Tue Dec 28 15:59:59 PST 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIGPzCCBeWgAwIBAgIQeXLZ2EcqLVKtHubt+xbL4TAKBggqhkjOPQQDAjCBkjEL\n" + - "MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE\n" + - "BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxODA2BgNVBAMT\n" + - "L0NPTU9ETyBFQ0MgRXh0ZW5kZWQgVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB\n" + - "MB4XDTE5MDkzMDAwMDAwMFoXDTIxMTIyODIzNTk1OVowggE6MREwDwYDVQQFEwgw\n" + - "NDA1ODY5MDETMBEGCysGAQQBgjc8AgEDEwJHQjEdMBsGA1UEDxMUUHJpdmF0ZSBP\n" + - "cmdhbml6YXRpb24xCzAJBgNVBAYTAkdCMQ8wDQYDVQQREwZNNSAzRVExEDAOBgNV\n" + - "BAcTB1NhbGZvcmQxFjAUBgNVBAkTDVRyYWZmb3JkIFJvYWQxFjAUBgNVBAkTDUV4\n" + - "Y2hhbmdlIFF1YXkxJTAjBgNVBAkTHDNyZCBGbG9vciw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B\n" + - "bASCAWgBZgB1AO5Lvbd1zmC64UJpH6vhnmajD35fsHLYgwDEe4l6qP3LAAABbYME\n" + - "EzgAAAQDAEYwRAIgbdo71lBleuJiq+D0ZLp51oVUyWD9EyrtgBSCNwIW4cMCIAqg\n" + - "0VFTWHEmAVjaV23fGj3Ybu3mpSiHr6viGlgA2lYaAHUAVYHUwhaQNgFK6gubVzxT\n" + - "8MDkOHhwJQgXL6OqHQcT0wwAAAFtgwQTKAAABAMARjBEAiBb/gW1RU7kgFBiNpHx\n" + - "LStujKIocyENUTXsMbsac+LktwIgXbEr8vOOCEdBdXQ2F/FKec8ft6gz57mHNmwl\n" + - "pp7phbQAdgC72d+8H4pxtZOUI5eqkntHOFeVCqtS6BqQlmQ2jh7RhQAAAW2DBBM6\n" + - "AAAEAwBHMEUCIQDjKN3h86ofR94+JxLFoYuoA+DRtxEY8XGg+NQXlZfUrgIgEoO2\n" + - "ZzKbGfohdwj/WtDwJDRX5pjXF4M0nECiwtYXDIwwCgYIKoZIzj0EAwIDSAAwRQIg\n" + - "AkIRVQBwrElFjrnqk5XPvnlnwkIm1A70ayqOf1FexoQCIQC8tBTn//RCfrhcgTjd\n" + - "ER4wRjFfFoc6lC68OHGVg9CZZg==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 02 02:53:40 PST 2021", System.out); - } -} - -class ComodoUserTrustRSA { - - // Owner: CN=Sectigo RSA Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Issuer: CN=USERTrust RSA Certification Authority, O=The USERTRUST Network, L=Jersey City, ST=New Jersey, C=US - // Serial number: 284e39c14b386d889c7299e58cd05a57 - // Valid from: Thu Nov 01 17:00:00 PDT 2018 until: Tue Dec 31 15:59:59 PST 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIGNDCCBBygAwIBAgIQKE45wUs4bYiccpnljNBaVzANBgkqhkiG9w0BAQwFADCB\n" + - "iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl\n" + - "cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV\n" + - "BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTgx\n" + - "MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBkTELMAkGA1UEBhMCR0IxGzAZBgNV\n" + - "BAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEYMBYGA1UE\n" + - "ChMPU2VjdGlnbyBMaW1pdGVkMTkwNwYDVQQDEzBTZWN0aWdvIFJTQSBFeHRlbmRl\n" + - "ZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIgQ0EwggEiMA0GCSqGSIb3DQEBAQUA\n" + - "A4IBDwAwggEKAoIBAQCaoslYBiqFev0Yc4TXPa0s9oliMcn9VaENfTUK4GVT7niB\n" + - "QXxC6Mt8kTtvyr5lU92hDQDh2WDPQsZ7oibh75t2kowT3z1S+Sy1GsUDM4NbdOde\n" + - "orcmzFm/b4bwD4G/G+pB4EX1HSfjN9eT0Hje+AGvCrd2MmnxJ+Yymv9BH9OB65jK\n" + - "rUO9Na4iHr48XWBDFvzsPCJ11Uioof6dRBVp+Lauj88Z7k2X8d606HeXn43h6acp\n" + - "LLURWyqXM0CrzedVWBzuXKuBEaqD6w/1VpLJvSU+wl3ScvXSLFp82DSRJVJONXWl\n" + - "dp9gjJioPGRByeZw11k3galbbF5gFK9xSnbDx29LAgMBAAGjggGNMIIBiTAfBgNV\n" + - "HSMEGDAWgBRTeb9aqitKz1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FcSZydtkVgXpouSFZkXNS/MYwbcCCcRKBbrk8ss0SI\n" + - "Xg1gTURjh9VP1OHm0OktYcUw9e90wHIDn7h0qA+bWOsZquSRzT4s2crF3ZSA3tuV\n" + - "/UJ33mjdVO8wBD8aI5y10QreSPJvZHHNDyCmoyjXvNhR+u3arXUoHWxO+MZBeXbi\n" + - "iF7Nwn/IEmQvWBW8l6D26CXIavcY1kAJcfyzHkrPbLo+fAOa/KFl3lIU+0biEVNk\n" + - "Q9zXE6hC6X4=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=usertrustrsacertificationauthority-ev.comodoca.com, O=Sectigo Limited, STREET="3rd Floor, - // 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, L=Salford, ST=Manchester, OID.2.5.4.17=M5 3EQ, - // C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=Sectigo RSA Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: 4e484426dbfed0c222b2ed152465614a - // Valid from: Mon Mar 01 16:00:00 PST 2021 until: Sat Apr 02 16:59:59 PDT 2022 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHTzCCBjegAwIBAgIQTkhEJtv+0MIisu0VJGVhSjANBgkqhkiG9w0BAQsFADCB\n" + - "kTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\n" + - "A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTkwNwYDVQQD\n" + - "EzBTZWN0aWdvIFJTQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIg\n" + - "Q0EwHhcNMjEwMzAyMDAwMDAwWhcNMjIwNDAyMjM1OTU5WjCCAToxETAPBgNVBAUT\n" + - "CDA0MDU4NjkwMRMwEQYLKwYBBAGCNz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lPVLvBo9ePWxJjmn\n" + - "whxlSyxQ5A5NdrTqZOJmu9nFr2HXpX75kGwCkUKZI050FAZZydsK3LfMBTqe1Xwi\n" + - "PKyjXDWd40LjOEg31sA43ofO8n2pySP5LG5XAsvoAyPCy3zXhx5cdtmQFLIkntus\n" + - "DCfN+n51HPUo8r4PUhQtOiRUB3K871LTdwyv4/CRXS2fIhtO1pxYNKFOw0yrUf6j\n" + - "ECgk\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=usertrustrsacertificationauthority-ev.comodoca.com, OU=COMODO EV SGC SSL, O=Sectigo Limited, - // STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, L=Salford, ST=Manchester, - // OID.2.5.4.17=M5 3EQ, C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=Sectigo RSA Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: b07fd164b5790c9d5d1fddff5819cdb2 - // Valid from: Sun Sep 29 17:00:00 PDT 2019 until: Tue Dec 28 15:59:59 PST 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIH5TCCBs2gAwIBAgIRALB/0WS1eQydXR/d/1gZzbIwDQYJKoZIhvcNAQELBQAw\n" + - "gZExCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO\n" + - "BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE5MDcGA1UE\n" + - "AxMwU2VjdGlnbyBSU0EgRXh0ZW5kZWQgVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVy\n" + - "IENBMB4XDTE5MDkzMDAwMDAwMFoXDTIxMTIyODIzNTk1OVowggFWMREwDwYDVQQF\n" + - "EwgwNDA1ODY5MDETMBEGCysGAQQBgjc8AgEDEwJHQjEdMBsGA1UEDx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\n" + - "S3YpVZnkN8tOwuxPsYeyVx/BtaNpMA0GCSqGSIb3DQEBCwUAA4IBAQAPFIsUFymo\n" + - "VTp0vntHrZpBApBQzDeriQv7Bi7tmou/Ng47RtXW3DjGdrePGSfOdl7h62k8qprU\n" + - "JeLyloDqhvmT/CG/hdwrfZ3Sv3N2xpetGcnW5S3oEi3m+/M1ls9eD+x1vybqV9Kd\n" + - "lcjuV7SYDlbvAS9w7TcygudhdW0cI8XTCvesGKohBkAlqaQ/MWYpt4WvsxHjbWgn\n" + - "5ZlIYR6A1ZFEjADifViH/5AA79lgGhAskkIWPjvRFalEVKTKtjhRK76eCfZs4Frr\n" + - "CEOpon+BeNKk+x/K/r10dSoWe0SV2uGVxTD83zkP++eREwo1hTgn8bXn7ftlnA3j\n" + - "7ml+Usz6udaD\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 02 02:55:42 PST 2021", System.out); - } -} - -class ComodoUserTrustECC { - - // Owner: CN=Sectigo ECC Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Issuer: CN=USERTrust ECC Certification Authority, O=The USERTRUST Network, L=Jersey City, ST=New Jersey, C=US - // Serial number: 80f5606d3a162b143adc12fbe8c2066f - // Valid from: Thu Nov 01 17:00:00 PDT 2018 until: Tue Dec 31 15:59:59 PST 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDyTCCA0+gAwIBAgIRAID1YG06FisUOtwS++jCBm8wCgYIKoZIzj0EAwMwgYgx\n" + - "CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtKZXJz\n" + - "ZXkgQ2l0eTEeMBwGA1UEChMVV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RwOi8vb2NzcC51c2VydHJ1c3QuY29tMAoGCCqGSM49\n" + - "BAMDA2gAMGUCMQCjHztBDL90GCRXHlGqm0H7kzP04hd0MxwakKjWzOmstXNFLONj\n" + - "RFa0JqI/iKUJMFcCMCbLgyzcFW7DihtY5XE0XCLCw+git0NjxiFB6FaOFIlyDdqT\n" + - "j+Th+DJ92JLvICVD/g==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=usertrustecccertificationauthority-ev.comodoca.com, O=Sectigo Limited, - // STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, L=Salford, - // ST=Manchester, OID.2.5.4.17=M5 3EQ, - // C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=Sectigo ECC Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: 9aa5da67480446fd7bf408fd5fdaa1d8 - // Valid from: Mon Mar 01 16:00:00 PST 2021 until: Sat Apr 02 16:59:59 PDT 2022 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFwTCCBWigAwIBAgIRAJql2mdIBEb9e/QI/V/aodgwCgYIKoZIzj0EAwIwgZEx\n" + - "CzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNV\n" + - "BAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE5MDcGA1UEAxMw\n" + - "U2VjdGlnbyBFQ0MgRXh0ZW5kZWQgVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB\n" + - "MB4XDTIxMDMwMjAwMDAwMFoXDTIyMDQwMjIzNTk1OVowggE6MREwDwYDVQQFEwgw\n" + - "NDA1ODY5MDETMBEGCysGAQQBgjc8AgEDEwJHQjEdMBsGA1UEDxMUUHJpdmF0ZSBP\n" + - "cmdhbml6YXRpb24xCzAJBgNVBAY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0MCMGCCsGAQUFBzABhhdodHRwOi8vb2NzcC5z\n" + - "ZWN0aWdvLmNvbTA9BgNVHREENjA0gjJ1c2VydHJ1c3RlY2NjZXJ0aWZpY2F0aW9u\n" + - "YXV0aG9yaXR5LWV2LmNvbW9kb2NhLmNvbTCCAQMGCisGAQQB1nkCBAIEgfQEgfEA\n" + - "7wB2AEalVet1+pEgMLWiiWn0830RLEF0vv1JuIWr8vxw/m1HAAABd/Kung0AAAQD\n" + - "AEcwRQIhAI16l52NctGAphhc6eh2kK2vO5QYk5nyouL3P6U/gG/dAiBfJRJ+iqE/\n" + - "noco35RpNtlV4GABrwmw1I/1R+L79VzwEAB1AG9Tdqwx8DEZ2JkApFEV/3cVHBHZ\n" + - "AsEAKQaNsgiaN9kTAAABd/KunvwAAAQDAEYwRAIgS+r3C10ua38DPJKvUJvW5bvL\n" + - "SCQ949n3sBJvhV6aXq4CIH/oEGgvJmKtMEjVKUQg8TrZO6LwQ+0sYfL79Qvm8wL3\n" + - "MAoGCCqGSM49BAMCA0cAMEQCID4Q9cc8OQ9tmKnnKZyplPsPipI5apVGkBqFRUSt\n" + - "zzM3AiAw5tw3cv/oabDsYdU+lmp5kZ/S3Z97ANAAaHE0AfXe/Q==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=usertrustecccertificationauthority-ev.comodoca.com, OU=COMODO EV SGC SSL, - // O=Sectigo Limited, STREET="3rd Floor, 26 Office Village", STREET=Exchange Quay, STREET=Trafford Road, - // L=Salford, OID.2.5.4.17=M5 3EQ, - // C=GB, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB, SERIALNUMBER=04058690 - // Issuer: CN=Sectigo ECC Extended Validation Secure Server CA, O=Sectigo Limited, L=Salford, - // ST=Greater Manchester, C=GB - // Serial number: 8b72489b7f505a55e2a22659c90ed2ab - // Valid from: Sun Sep 29 17:00:00 PDT 2019 until: Tue Dec 28 15:59:59 PST 2021 - private static final String REVOKED = "-----BEGIN CERTIFIC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AAAB\n" + - "bYL/SJoAAAQDAEgwRgIhAI8OgzP/kzF1bOJRHU2S/ewij/6HpGPy7Mbm7Hyuv3IU\n" + - "AiEAxDmX2FmORlgeerQmQ+ar3D9/TwA9RQckVDu5IrgweREwCgYIKoZIzj0EAwID\n" + - "SAAwRQIhAPwQWGWd3oR7YJ7ngCDQ9TAbdPgND51SiR34WfEgaTQtAiAxD4umKm02\n" + - "59GEMj5NpyF2ZQEq5mEGcjJNojrn+PC4zg==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 02 02:59:25 PST 2021", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/DigicertCSRootG5.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/DigicertCSRootG5.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/DigicertCSRootG5.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/DigicertCSRootG5.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,303 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8318759 + * @summary Interoperability tests with Digicert CS Root G5 certificates + * @build ValidatePathWithParams + * @run main/othervm -Djava.security.debug=ocsp,certpath DigicertCSRootG5 OCSP + * @run main/othervm -Djava.security.debug=certpath DigicertCSRootG5 CRL + */ + +public class DigicertCSRootG5 { + + public static void main(String[] args) throws Exception { + + ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); + + if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { + pathValidator.enableCRLCheck(); + } else { + // OCSP check by default + pathValidator.enableOCSPCheck(); + } + + new Digicert_CS_ECC().runTest(pathValidator); + new Digicert_CS_RSA().runTest(pathValidator); + } +} + +class Digicert_CS_ECC { + + // Owner: CN=DigiCert G5 CS ECC SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Issuer: CN=DigiCert CS ECC P384 Root G5, O="DigiCert, Inc.", C=US + // Serial number: d926818addd3c47758f0ace9379b2e7 + // Valid from: Wed Feb 10 16:00:00 PST 2021 until: Sun Feb 10 15:59:59 PST 2036 + private static final String INT = "-----BEGIN CERTIFICATE-----\n" + + "MIIDOTCCAsCgAwIBAgIQDZJoGK3dPEd1jwrOk3my5zAKBggqhkjOPQQDAzBNMQsw\n" + + "CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERp\n" + + "Z2lDZXJ0IENTIEVDQyBQMzg0IFJvb3QgRzUwHhcNMjEwMjExMDAwMDAwWhcNMzYw\n" + + "MjEwMjM1OTU5WjBTMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIElu\n" + + "Yy4xKzApBgNVBAMTIkRpZ2lDZXJ0IEc1IENTIEVDQyBTSEEzODQgMjAyMSBDQTEw\n" + + "djAQBgcqhkjOPQIBBgUrgQQAIgNiAAS/zvKH4sLLu/zze3/+vHyfRE5OcO77TNw3\n" + + "MCMAlad2Y/ja50KTooGSmXhfwMXpbBTob7hsoxpvIU92W6DhFn9lg4pcKf5UHLEi\n" + + "0iDdHQ9w0hpFJiMABwK60nk+OwsGTZSjggFdMIIBWTASBgNVHRMBAf8ECDAGAQH/\n" + + "AgEAMB0GA1UdDgQWBBTXHcf6xvqCdCBFcTQSL1XVmEGSXjAfBgNVHSMEGDAWgBTw\n" + + "jJhxOThlwjobphdmHcjtZd6SNjAOBgNVHQ8BAf8EBAMCAYYwEwYDVR0lBAwwCgYI\n" + + "KwYBBQUHAwMweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRwOi8vb2Nz\n" + + "cC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2lj\n" + + "ZXJ0LmNvbS9EaWdpQ2VydENTRUNDUDM4NFJvb3RHNS5jcnQwRQYDVR0fBD4wPDA6\n" + + "oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0Q1NFQ0NQMzg0\n" + + "Um9vdEc1LmNybDAcBgNVHSAEFTATMAcGBWeBDAEDMAgGBmeBDAEEATAKBggqhkjO\n" + + "PQQDAwNnADBkAjByCWijRCnJogZf94U5HG/5S4QFMxEOBSAyxECbFxgrXMKXh5qa\n" + + "7oS2F+hT2DPzxTwCMCIthK0X/14bxZvrNNiNSWzer2TDUyRw6HNIfnkHgqaGFQVA\n" + + "KyS5I77prv53stK0XQ==\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN="Win The Customer, LLC", O="Win The Customer, LLC", L=Saratoga + // Springs, ST=Utah, C=US, SERIALNUMBER=9637546-0160, OID.2.5.4.15=Private + // Organization, OID.1.3.6.1.4.1.311.60.2.1.2=Utah, OID.1.3.6.1.4.1.311.60.2.1.3=US + // Issuer: CN=DigiCert G5 CS ECC SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Serial number: b13737c3caf58eecb4359f441522133 + // Valid from: Wed Jan 25 16:00:00 PST 2023 until: Tue Jan 28 15:59:59 PST 2025 + private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + + "MIIEEjCCA5mgAwIBAgIQCxNzfDyvWO7LQ1n0QVIhMzAKBggqhkjOPQQDAzBTMQsw\n" + + "CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xKzApBgNVBAMTIkRp\n" + + "Z2lDZXJ0IEc1IENTIEVDQyBTSEEzODQgMjAyMSBDQTEwHhcNMjMwMTI2MDAwMDAw\n" + + "WhcNMjUwMTI4MjM1OTU5WjCB2TETMBEGCysGAQQBgjc8AgEDEwJVUzEVMBMGCysG\n" + + "AQQBgjc8AgECEwRVdGFoMR0wGwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjEV\n" + + "MBMGA1UEBRMMOTYzNzU0Ni0wMTYwMQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRh\n" + + "aDEZMBcGA1UEBxMQU2FyYXRvZ2EgU3ByaW5nczEeMBwGA1UEChMVV2luIFRoZSBD\n" + + "dXN0b21lciwgTExDMR4wHAYDVQQDExVXaW4gVGhlIEN1c3RvbWVyLCBMTEMwWTAT\n" + + "BgcqhkjOPQIBBggqhkjOPQMBBwNCAASyShgaH44RcHazlEEMpwRKY4YebnygI9hG\n" + + "wTMQE/VFG40k3tR8lnyjgxTzZbC0aCVavdv1eglDGejQ+6iD8nzgo4IBxjCCAcIw\n" + + "HwYDVR0jBBgwFoAU1x3H+sb6gnQgRXE0Ei9V1ZhBkl4wHQYDVR0OBBYEFLGgEWb9\n" + + "GF89JoXyan/FD/auNIVVMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEF\n" + + "BQcDAzCBjQYDVR0fBIGFMIGCMD+gPaA7hjlodHRwOi8vY3JsMy5kaWdpY2VydC5j\n" + + "b20vRGlnaUNlcnRHNUNTRUNDU0hBMzg0MjAyMUNBMS5jcmwwP6A9oDuGOWh0dHA6\n" + + "Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEc1Q1NFQ0NTSEEzODQyMDIxQ0Ex\n" + + "LmNybDA9BgNVHSAENjA0MDIGBWeBDAEDMCkwJwYIKwYBBQUHAgEWG2h0dHA6Ly93\n" + + "d3cuZGlnaWNlcnQuY29tL0NQUzB+BggrBgEFBQcBAQRyMHAwJAYIKwYBBQUHMAGG\n" + + "GGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBIBggrBgEFBQcwAoY8aHR0cDovL2Nh\n" + + "Y2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0RzVDU0VDQ1NIQTM4NDIwMjFDQTEu\n" + + "Y3J0MAwGA1UdEwEB/wQCMAAwCgYIKoZIzj0EAwMDZwAwZAIwLkWJc/eLxftorFCv\n" + + "ocOA1dfUFx7Al18d5Xsgpkx47kj2DWgQU+/bQEbbyPrKzYgCAjAP5ErLauJRC2to\n" + + "pPk/yXZYXsusmWVH7ozl9O5WR7+a3gVQ1zwVFWuqdjbq3zWWqJM=\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN=Win the Customer LLC, O=Win the Customer LLC, L=Saratoga Springs, ST=Utah, C=US + // Issuer: CN=DigiCert G5 CS ECC SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Serial number: 201e51cb1ec8a56a1e8438c95adf024 + // Valid from: Sun Oct 22 17:00:00 PDT 2023 until: Tue Oct 22 16:59:59 PDT 2024 + private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + + "MIIFdjCCBP2gAwIBAgIQAgHlHLHsilah6EOMla3wJDAKBggqhkjOPQQDAzBTMQsw\n" + + "CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xKzApBgNVBAMTIkRp\n" + + "Z2lDZXJ0IEc1IENTIEVDQyBTSEEz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0IEVxNBIv\n" + + "VdWYQZJeMB0GA1UdDgQWBBR5Hkdl3jgG88ixGc1wEwO6N9Rn2TA+BgNVHSAENzA1\n" + + "MDMGBmeBDAEEATApMCcGCCsGAQUFBwIBFhtodHRwOi8vd3d3LmRpZ2ljZXJ0LmNv\n" + + "bS9DUFMwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMIGNBgNV\n" + + "HR8EgYUwgYIwP6A9oDuGOWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\n" + + "dEc1Q1NFQ0NTSEEzODQyMDIxQ0ExLmNybDA/oD2gO4Y5aHR0cDovL2NybDQuZGln\n" + + "aWNlcnQuY29tL0RpZ2lDZXJ0RzVDU0VDQ1NIQTM4NDIwMjFDQTEuY3JsMH4GCCsG\n" + + "AQUFBwEBBHIwcDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29t\n" + + "MEgGCCsGAQUFBzAChjxodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNl\n" + + "cnRHNUNTRUNDU0hBMzg0MjAyMUNBMS5jcnQwCQYDVR0TBAIwADAKBggqhkjOPQQD\n" + + "AwNnADBkAjA9aX3CSzCOZiHdC6JBF0nQwPLGNipPdHFMSbINmfpuHCC3Go4prf8M\n" + + "WCsWEQr2gQYCMErfcrU8zfxnQ9SxsmGJ8jkM3MDGvAr0CtzDwmWis32V60jAUFBQ\n" + + "lGm/Mdb5/EqKpw==\n" + + "-----END CERTIFICATE-----"; + + public void runTest(ValidatePathWithParams pathValidator) throws Exception { + // Validate valid + pathValidator.validate(new String[]{VALID, INT}, + ValidatePathWithParams.Status.GOOD, null, System.out); + + // Validate Revoked + pathValidator.validate(new String[]{REVOKED, INT}, + ValidatePathWithParams.Status.REVOKED, + "Mon Oct 23 14:48:38 PDT 2023", System.out); + } +} + +class Digicert_CS_RSA { + + // Owner: CN=DigiCert G5 CS RSA4096 SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Issuer: CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US + // Serial number: 10262e16224ca6dfef584f8c63048db + // Valid from: Wed Feb 10 16:00:00 PST 2021 until: Sun Feb 10 15:59:59 PST 2036 + private static final String INT = "-----BEGIN CERTIFICATE-----\n" + + "MIIGjDCCBHSgAwIBAgIQAQJi4WIkym3+9YT4xjBI2zANBgkqhkiG9w0BAQwFADBM\n" + + "MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJDAiBgNVBAMT\n" + + "G0RpZ2lDZXJ0IENTIFJTQTQwOTYgUm9vdCBHNTAeFw0yMTAyMTEwMDAwMDBaFw0z\n" + + "NjAyMTAyMzU5NTlaMFcxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwg\n" + + "SW5jLjEvMC0GA1UEAxMmRGlnaUNlcnQgRzUgQ1MgUlNBNDA5NiBTSEEzODQgMjAy\n" + + "MSBDQTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC1GOMV0tdTLLBk\n" + + "Ylmccgb6bFa9By5zkuLg9NfFMl4y9P9f21C7N+mMA4fWgfjEs+7/3ByGLaB+7/Pi\n" + + "TT3qXpvBz4uVWob9xv3lkAsIpwh/TMJulijy3GdpAQBMdvW/+HFrbRJGaJ3MM9d1\n" + + "pC3CRPmFWyXUpxqhb0FbMPA8OlsZNjg9fd/zCLevSJlL6ZdjfZ/4FiF26OfO60V6\n" + + "bOuTnd8JbDuwPfMWLP6qEinlFr7V9mjcZc4dfUWH70y7M6av7R1Tc68YQjrtPwIA\n" + + "5pdEcG/VeBVplpne1uxuc61ucVgTpjwOTV6E2KrCe+OCG8/m4voN7T4GC1RfPH3n\n" + + "PlCNV6MeiCVwExPhJFxZ+eTvhVJe0W7mriYpEo2kNR4pnSUhiS92vF4lI3ToAdnH\n" + + "LV+yx0VdsPVwEO344rsVNQv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J/8b4u9IHblq3ykQ/LyKuCYDf\n" + + "v2bnqlT+HY4mgU9ZA0WoO/L7V7m0sBrBYhpdM0pmxlqn6mpvWIHA2tC4rsTY2TXn\n" + + "ZlXbyJaMd5mvjRjvK0DF/2yoKC+us/1li2blLZKS9k0Z36/m4D7z5nVXkmUvRvE2\n" + + "70BhJ0NnM5lHtytTR+OgiaPapeiDy6AA+VbdnV7hhINGEhP7tF3IZPPfmKZN7/bN\n" + + "Qr7wuKZx/jO5sTBtblBaOU2+xric+MlTt2k3ilDnO3EzkZOp1JMWnNjAZciRa8Gy\n" + + "bYAXrsxY4vQnxgA7dj1/3KDB+pCRT7CTMOJJQu27OOv0MuNkb1E+8chPx/eFwfrN\n" + + "rft1Eiqp3Te0w4njDkzukP6EMhebcTp3POm0YhMZl8s1fTI6DCcHFwcMVywXiWwv\n" + + "QG+Td+dHlFT0P8jq/ecaMj6s8j69q36MER+QMyrxGAl3MHyEA7BBut1WCh9dsOnY\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN="Win The Customer, LLC", O="Win The Customer, LLC", L=Saratoga + // Springs, ST=Utah, C=US + // Issuer: CN=DigiCert G5 CS RSA4096 SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Serial number: bfec2fd49eeacb347ddbea5c1576083 + // Valid from: Fri Jun 23 17:00:00 PDT 2023 until: Wed Jun 26 16:59:59 PDT 2024 + private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + + "MIIGqzCCBJOgAwIBAgIQC/7C/UnurLNH3b6lwVdggzANBgkqhkiG9w0BAQsFADBX" + + "MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xLzAtBgNVBAMT" + + "JkRpZ2lDZXJ0IEc1IENTIFJTQTQwOTYgU0hBMzg0IDIwMjEgQ0ExMB4XDTIzMDYy" + + "NDAwMDAwMFoXDTI0MDYyNjIzNTk1OVowdzELMAkGA1UEBhMCVVMxDTALBgNVBAgT" + + "BFV0YWgxGTAXBgN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q3zQqsGa9xdQ50EovjWymbvWzCQ==\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN=Win the Customer LLC, O=Win the Customer LLC, L=Saratoga Springs, + // ST=Utah, C=US + // Issuer: CN=DigiCert G5 CS RSA4096 SHA384 2021 CA1, O="DigiCert, Inc.", C=US + // Serial number: f409d101094769abaf06f085f11ca4f + // Valid from: Sun Oct 22 17:00:00 PDT 2023 until: Tue Oct 22 16:59:59 PDT 2024 + private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + + "MIIHKTCCBRGgAwIBAgIQD0CdEBCUdpq68G8IXxHKTzANBgkqhkiG9w0BAQsFADBX\n" + + "MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xLzAtBgNVBAMT\n" + + "JkRpZ2lDZXJ0IEc1IENTIFJTQTQwOTYgU0hBMzg0IDIwMjEgQ0ExMB4XDTIzMTAy\n" + + "MzAwMDAwMFoXDTI0MTAyMjIzNTk1OVowdTELMAkGA1UEBhMCVVMxDTALBgNVBAgT\n" + + "BFV0YWgxGTAXBgNVBAcTEFNhcmF0b2dhIFNwcmluZ3MxHTAbBgNVBAoTFFdpbiB0\n" + + "aGUgQ3VzdG9tZXIgTExDMR0wGwYDVQQDExRXaW4gdGhlIEN1c3RvbWVyIExMQzCC\n" + + "AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANKPhVjUn2MyZs/l4AO0kQCE\n" + + "HdR9aWJ86nT8jSSbHdRv56n3h5P3sxMfFne4jCY3DzrykndeLp4gAt2sot1ziinh\n" + + "ahMOYOZtvyUzt5/McvQyuQjdXLaSuWcvlKaTl67U3QWQe+P6kmkRDsrCH0S51UeH\n" + + "8Tct/bq7ZUyX9Jb80VPVegUN80YzDgkJ2OrLngD6EKVYKQlV5K+KGyQpCOWq5CEB\n" + + "1aX63EnGiSMy0OOsS/J8aFz3BoYpEcrLSSnW84P6AhbevMfO7kr4mTLZKkx0Ic0Q\n" + + "s6TuaXcf84O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XJ0RzVDU1JTQTQwOTZTSEEzODQyMDIxQ0ExLmNydDAJ\n" + + "BgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4ICAQAKCH6ri6f507/j2ifF7VQbavWE\n" + + "Wn4T63PzJveL6/kedV7avhrQ/B6uHrez1xy/RH/MlL/B+TF6YTg+ILqtKR/PyJrg\n" + + "N+1RON0Eg3AEWWDtGl3KBYFlklz8Szo+xmXf5GYiqueejbxscH1BA0PU/5CgGkr6\n" + + "1Kk4OXqKqmpuPeQCxca1ARDD749E/2IFsDGC8kBCWepV62l0/xcDKWD5Zn+y4Tkh\n" + + "5+YJJ21D746sNDOsDNJ4DuqEYrXWUH6BlT5EDYelGqRCOdyTYUdDg+QcSFWnH7wR\n" + + "O+eIA3BLSw0x1Vh6DJRKm5H644sPVppaI1jVZDe+zBwp2e/j8XH7KDlp/WaRUhcU\n" + + "bjGg2Ss5TMbBjR6B4nMwjvqaCIFoAD6aFRYc80px/KY6KTSyOFF0FBQNuhSsUZQy\n" + + "p74aRjUraSu/RiJMA8A6OYGo1b7W9o/UOg0MB4WQkfwl+Mxh+58QKjLjZr9VVapW\n" + + "4yv0G/G6rT/pHrRiyBcT7Kt4xNFsmMFAN4BXL9WI9mkGDa4iwDmWVjIjAaiilaaC\n" + + "MIXwwm3eg/QBgWBUrwXf3YC+1HXkaFDZc5apQ5uaNJPjQo9nQ6xqfpnACXTJ/Lwm\n" + + "JBu4YlXPby5Vh6mWWSyVdbICrCD7BtGP8aSBPFGPEuPEjK32uyeoGWVwwSubVFPX\n" + + "ARhLX5oSFZUySvHgYg==\n" + + "-----END CERTIFICATE-----"; + + public void runTest(ValidatePathWithParams pathValidator) throws Exception { + // Validate valid + pathValidator.validate(new String[]{VALID, INT}, + ValidatePathWithParams.Status.GOOD, null, System.out); + + // Validate Revoked + pathValidator.validate(new String[]{REVOKED, INT}, + ValidatePathWithParams.Status.REVOKED, + "Mon Oct 23 14:44:23 PDT 2023", System.out); + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EmSignRootG2CA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EmSignRootG2CA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EmSignRootG2CA.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EmSignRootG2CA.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8319187 + * @summary Interoperability tests with eMudhra emSign Root CA G2 CS root + * @build ValidatePathWithParams + * @run main/othervm -Djava.security.debug=certpath EmSignRootG2CA OCSP + * @run main/othervm -Djava.security.debug=certpath EmSignRootG2CA CRL + */ + +public class EmSignRootG2CA { + + // Owner: CN=emSign CS CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN + // Issuer: CN=emSign Root CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN + // Serial number: c084e666596139a1fa9b + // Valid from: Sun Feb 18 10:30:00 PST 2018 until: Fri Feb 18 10:30:00 PST 2033 + private static final String INT = "-----BEGIN CERTIFICATE-----\n" + + "MIIGeDCCBGCgAwIBAgILAMCE5mZZYTmh+pswDQYJKoZIhvcNAQEMBQAwZzELMAkG\n" + + "A1UEBhMCSU4xEzARBgNVBAsTCmVtU2lnbiBQS0kxJTAjBgNVBAoTHGVNdWRocmEg\n" + + "VGVjaG5vbG9naWVzIExpbWl0ZWQxHDAaBgNVBAMTE2VtU2lnbiBSb290IENBIC0g\n" + + "RzIwHhcNMTgwMjE4MTgzMDAwWhcNMzMwMjE4MTgzMDAwWjBlMQswCQYDVQQGEwJJ\n" + + "TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s\n" + + "b2dpZXMgTGltaXRlZDEaMBgGA1UEAxMRZW1TaWduIENTIENBIC0gRzIwggIiMA0G\n" + + "CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDYYkv6Q9an5RylOJ6rkTAHT0cAwfYg\n" + + "ZsFKk/Hz/4VwWYsmzf+Z7M8i3CK3mnUcqgw0AIzrVLUwxiKAaL0qca+SbXwOk/7p\n" + + "Y/zwwLdg0OhHVGeeU3OTvkbsBpiLS08i7ids9FGrte6m1kqk+QSOY2F5AESxA4+F\n" + + "AKXGtzIImQd15m67C88AzzFsvszAAxSvVTqs4hb8BcRnUCzlAp7gMJSwwrrgTiEv\n" + + "6Ap6cFVT+n1oj6370sd5KBiRelLoqZtQx4njoNJkJlM30ftPNMGnqPLCloQ6koP/\n" + + "dAdpmwWB+F0/5d5UVmVPC3R/F8w7aX3fdSC8+M2E/ZXPVIYkEquLT7K2yXhRl3hn\n" + + "xwG6qqGp6TjvKvhiyac8qieu9YNG1R+PVFqejOFMohV2g0Z5MfwaruhUCNwHHeZs\n" + + "Dv/MVYMiHcV+5qU+MMzcKngb3RCmq0jzCb+MESomEMiAieCC15W7YC/LpgDHO0jY\n" + + "vV4AdLquUHfsOnhT2KD7mEg2PnL7JOwoQSFtuJYmM/coh+Y6CIoV3x+aV1bO7FDF\n" + + "ap33u36lE639oQj0tTqW3n1WcyNxhD0lwGlYIAjG8XnhRjtl6/MVVrGuyPWpB4TH\n" + + "u8CgNT0roENuq13RnHbBz2rLnndenHiMbxCyElGJBpZfXiF1H25KHUzvyzxt++L+\n" + + "hSfprX9BSXLpGQIDAQABo4IBJTCCASEwHwYDVR0jBBgwFoAU7exNRWEYKOezIygR\n" + + "HE2lJw1e7PQwHQYDVR0OBBYEFBWGyrZ0lhdIWDSCLM3S4XWer0S3MA4GA1UdDwEB\n" + + "/wQEAwIBBjATBgNVHSUEDDAKBggrBgEFBQcDAzA9BgNVHSAENjA0MDIGBFUdIAAw\n" + + "KjAoBggrBgEFBQcCARYcaHR0cDovL3JlcG9zaXRvcnkuZW1zaWduLmNvbTASBgNV\n" + + "HRMBAf8ECDAGAQH/AgEAMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcwAYYWaHR0\n" + + "cDovL29jc3AuZW1zaWduLmNvbTAzBgNVHR8ELDAqMCigJqAkhiJodHRwOi8vY3Js\n" + + "LmVtc2lnbi5jb20/Um9vdENBRzIuY3JsMA0GCSqGSIb3DQEBDAUAA4ICAQCDkogs\n" + + "d5Tv1zwsQdk15btzYK/oI1tEwvN6IpIM9rSqIrje8XnXKjHHmbHX6emHIR31bxuK\n" + + "7mY77XjrJMWp+71udC/DgDy4tfZTXIzEekI0XQfcui1UPC08Ysl0taQKTANwsAOV\n" + + "VSi7boSGqLet0qSmeKVyQ5/blbwx1NhjyLTyi66rVYf7fYdPV55X5TKUJdKDgiRI\n" + + "BomNVRcrrnHZtS8+t9CXxSXR35VAu2ube44Tl+dQHIWz9XwLxtYFwIPSEdqPpoAu\n" + + "5XEVo7evwMHQoY/MQj6Ywbw6tYh6bHu6C/qrp4oSyYXbz2ZWlHkz1oEXvefi7a9Z\n" + + "6mKnnaY3UYHq5AI+k6ojazVFbSTenb/TO/Z247gdhG7Wssshd6pgyqcTEa+FZz+F\n" + + "5ZZdoiIl8UJsTCPPg0xP9Ab0WE3BjCCqTPt+Czbd3cgBxiBS7KTQs/DnQRFuPCjC\n" + + "khbDtHsCN4aUoLM9OOw94/ZcoU0G5cg9mSvONBxUv9W7SIpJreXXMPXixcBKULoJ\n" + + "focui3s0yzGqTA9tSzQ4nmA9aXBCAAxrABlY/hk10ImeBa1SPjocRb/vuCaGp74T\n" + + "n8oADP42XudDnp8wlOKWxFJulhNi960Rev+5vZOPF/LGfS78GI6yzBjR49VJGhOP\n" + + "EJK8NSNmK3FNblQfOyFM7VE0uOGHOUwpMGVM2A==\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN=test, OU=test, O=test, L=test, ST=test, C=IN + // Issuer: CN=emSign CS CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN + // Serial number: 7c9ade672c0ad1b6 + // Valid from: Wed Aug 30 05:39:25 PDT 2023 until: Sat Aug 30 05:39:25 PDT 2025 + private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + + "MIIGNjCCBB6gAwIBAgIIfJreZywK0bYwDQYJKoZIhvcNAQEMBQAwZTELMAkGA1UE\n" + + "BhMCSU4xEzARBgNVBAsTCmVtU2lnbiBQS0kxJTAjBgNVBAoTHGVNdWRocmEgVGVj\n" + + "aG5vbG9naWVzIExpbWl0ZWQxGjAYBgNVBAMTEWVtU2lnbiBDUyBDQSAtIEcyMB4X\n" + + "DTIzMDgzMDEyMzkyNVoXDTI1MDgzMDEyMzkyNVowWDELMAkGA1UEBhMCSU4xDTAL\n" + + "BgNVBAgTBHRlc3QxDTALBgNVBAcTBHRlc3QxDTALBgNVBAoMBHRlc3QxDTALBgNV\n" + + "BAsTBHRlc3QxDTALBgNVBAMTBHRlc3QwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAw\n" + + "ggGKAoIBgQC04pOiSFbl7Bd4wFYXzzyukKh+EmwIq8xRGQDkuYH+C6Zao36VAV+k\n" + + "xGw7lmM3rf4YUcArgZYHfrxgPJNBbGrCi/YnEPYQTNw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gycI\n" + + "qrMK848wISX6jl2wg6b275sWQHzQRxA6rbB76bF2HXLFcpITJPaz+vjetYOVQd4v\n" + + "l8iZN52OpN6Pwrheiz7JhdLiHisN+2NKMmF899bH7w1l2Sr/FQl5vqk41gwwWMen\n" + + "99Waf4Bp6p3lvBArK2BbabTs8+16xvmkHEK3d3l3Bu6qTEbQRgUI5XsVXmXXn8Pg\n" + + "IANliTEsbsN9CMWrJ56ciEujU7w2L+IBfvKhl10N1AQNHwpQzwfFyz2BUbACN75o\n" + + "feIUBarM3ssNzpnt7idgkCTwWVrdEL1NHyW967aEMWyVwaRrtkjFOW/0xuSr2rEI\n" + + "jBpPj5RPdP6ZEaqnmg5PIgSrJ8FBjx6JmvVgZH/XEl5MZ7PsvJFfIMun6RxXtGn7\n" + + "QP0+ipkRrI6USNFS84H53Q0WJhQWZUgd3cdm37wpFGvxOVEskIgJNW9SbOgiT9sB\n" + + "zTIy3ceOK2onmUkDM2Q2+Hbc7A4BmNIlW4fpYXvZlM7IXSl9U3Voks92Hi45azgz\n" + + "StWZv9+Ronmmp+b7JKCe7MZXIBHfj0JhAVNJiYTZ9BqkY2VRvuQPVUdKxske9fQ6\n" + + "ciFJ5a6RDOhce6pFloaQu39ci2XCY1N4mIR3vFzpmBNkttlEXviK07XNTv9cnQt6\n" + + "3CW5aMAsfTbmOw==\n" + + "-----END CERTIFICATE-----"; + + // Owner: CN=test, OU=test, O=test, L=test, ST=test, C=IN + // Issuer: CN=emSign CS CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN + // Serial number: cf02dedd03d2f509 + // Valid from: Thu Oct 05 22:38:51 PDT 2023 until: Sun Oct 05 22:38:51 PDT 2025 + private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + + "MIIGNzCCBB+gAwIBAgIJAM8C3t0D0vUJMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNV\n" + + "BAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk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" + + "B8hh27KWA6IRt7URI51MZlh0e8fULyXlOZcoJA/IPX9RdePa2RHFuPSypBHjoN7z\n" + + "6bCML1XZ2xnHIAg=\n" + + "-----END CERTIFICATE-----"; + + public static void main(String[] args) throws Exception { + + ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); + + if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { + pathValidator.enableCRLCheck(); + } else { + // OCSP check by default + pathValidator.enableOCSPCheck(); + } + + // Validate valid + pathValidator.validate(new String[]{VALID, INT}, + ValidatePathWithParams.Status.GOOD, null, System.out); + + // Validate Revoked + pathValidator.validate(new String[]{REVOKED, INT}, + ValidatePathWithParams.Status.REVOKED, + "Thu Oct 05 22:51:36 PDT 2023", System.out); + } +} \ No newline at end of file diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EntrustCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EntrustCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EntrustCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/EntrustCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,319 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8195774 8243321 - * @summary Interoperability tests with Entrust CAs - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath EntrustCA OCSP - * @run main/othervm -Djava.security.debug=certpath EntrustCA CRL - */ - -/* - * Obtain test artifacts for Entrust CA from: - * - * EC CA: - * Valid: https://validec.entrust.net - * Revoked https://revokedec.entrust.net - * - * G4 CA: - * Valid: https://validg4.entrust.net - * Revoked: https://revokedg4.entrust.net - */ -public class EntrustCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - boolean ocspEnabled = false; - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - ocspEnabled = true; - } - - new Entrust_ECCA().runTest(pathValidator, ocspEnabled); - new Entrust_G4().runTest(pathValidator, ocspEnabled); - } -} - -class Entrust_ECCA { - - // Owner: CN=Entrust Certification Authority - L1J, OU="(c) 2016 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - // Issuer: CN=Entrust Root Certification Authority - EC1, OU="(c) 2012 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIID5zCCA2ygAwIBAgIQCoPUgD5+n1EAAAAAUdTB9zAKBggqhkjOPQQDAzCBvzEL\n" + - "MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1Nl\n" + - "ZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEy\n" + - "IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug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ZgIxAPnVAOqxKDd7\n" + - "v37EBmpPqWCCWBFPKW6HpRx3GUWc9caeQIw8rO2HXYgf92pb/TsJYAIxAJhI0MpR\n" + - "z5L42xF1R9UIPfQxCMwgsnWBqIqcfMrMO+2DxQy6GIP3cFFj9gRyxguKWw==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=validec.entrust.net, SERIALNUMBER=D15576572, OID.2.5.4.15=Private Organization, O="Entrust, Inc.", - // OID.1.3.6.1.4.1.311.60.2.1.2=Maryland, OID.1.3.6.1.4.1.311.60.2.1.3=US, L=Kanata, ST=Ontario, C=CA - // Issuer: CN=Entrust Certification Authority - L1J, OU="(c) 2016 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFrTCCBTKgAwIBAgIQYtgW4DLwh74AAAAAVqBXkTAKBggqhkjOPQQDAjCBujEL\n" + - "MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1Nl\n" + - "ZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDE2\n" + - "IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEuMCwGA1UE\n" + - "AxMlRW50cnVzdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEwxSjAeFw0xODA2\n" + - "MjUxMzE1NTdaFw0xOTA2MjUxMzQ1NTBaMIHJMQswCQYDVQQGEwJDQTEQMA4GA1UE\n" + - "CBMHT250YXJpbzEPMA0GA1UEBxMGS2FuYXRhMRMwEQYLKwYBBAGCNzwCAQMTAlVT\n" + - "MRkwFwYLKwYBBAGCNzwCAQITCE1hcnlsYW5kMRYwFAYDVQQKEw1FbnRydXN0LCBJ\n" + - "bmMuMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjESMBAG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SG\n" + - "Imh0dHA6Ly9jcmwuZW50cnVzdC5uZXQvbGV2ZWwxai5jcmwwSgYDVR0gBEMwQTA2\n" + - "BgpghkgBhvpsCgECMCgwJgYIKwYBBQUHAgEWGmh0dHA6Ly93d3cuZW50cnVzdC5u\n" + - "ZXQvcnBhMAcGBWeBDAEBMB8GA1UdIwQYMBaAFMP5RQO+yPkLPEU18+ty7Ofo65Sb\n" + - "MB0GA1UdDgQWBBT+J7OhS6gskCanmOGnx10DPSF8ATAJBgNVHRMEAjAAMAoGCCqG\n" + - "SM49BAMCA2kAMGYCMQCQLUQABT74TmdHzAtB97uNF5+Zy15wzkmlKeRSOXCIf2C5\n" + - "YKjsgdkR1OdzZXcpjNgCMQDfWcdPhodNXZC4l1lLPOPaTzPPw6uVqqoITQlc6r1t\n" + - "dRkkD6K9ii/X8EtwoFp7s80=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revokedec.entrust.net, SERIALNUMBER=115868500, OID.2.5.4.15=Private Organization, O="Entrust, Inc.", - // OID.1.3.6.1.4.1.311.60.2.1.2=Texas, OID.1.3.6.1.4.1.311.60.2.1.3=US, L=Kanata, ST=Ontario, C=CA - // Issuer: CN=Entrust Certification Authority - L1J, OU="(c) 2016 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIGJzCCBaygAwIBAgIRAM0WDfag1taIAAAAAFagJ5gwCgYIKoZIzj0EAwIwgbox\n" + - "CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9T\n" + - "ZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAx\n" + - "NiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxLjAsBgNV\n" + - "BAMTJUVudHJ1c3QgQ2VydGlmaW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1eQ3GUX04CICffGj3A\n" + - "WWmK9lixmk35YklMnSXNqHQezSYRiCYtXxejAHcApLkJkLQYWBSHuxOizGdwCjw1\n" + - "mAT5G9+443fNDsgN3BAAAAFcO4inUwAABAMASDBGAiEA+8T9tpPw/mU/STsNv0oz\n" + - "8Nla21fKlpEOyWqDKWPSUeYCIQCwI5tDyyaJtyFY9/OVqLG+BKPKjscUtTqGJYl4\n" + - "XbOo1jAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF\n" + - "BwMCMGMGCCsGAQUFBwEBBFcwVTAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZW50\n" + - "cnVzdC5uZXQwLgYIKwYBBQUHMAKGImh0dHA6Ly9haWEuZW50cnVzdC5uZXQvbDFq\n" + - "LWVjMS5jZXIwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2NybC5lbnRydXN0Lm5l\n" + - "dC9sZXZlbDFqLmNybDBKBgNVHSAEQzBBMDYGCmCGSAGG+mwKAQIwKDAmBggrBgEF\n" + - "BQcCARYaaHR0cDovL3d3dy5lbnRydXN0Lm5ldC9ycGEwBwYFZ4EMAQEwHwYDVR0j\n" + - "BBgwFoAUw/lFA77I+Qs8RTXz63Ls5+jrlJswHQYDVR0OBBYEFIj28ytR8ulo1p2t\n" + - "ZnBQOLK0rlLUMAkGA1UdEwQCMAAwCgYIKoZIzj0EAwIDaQAwZgIxANzqGRI0en5P\n" + - "gSUDcdwoQSNKrBPBfGz2AQVLHAXsxvIlGhKZAQtM49zxA8AdFy/agwIxAMEjJH6A\n" + - "4UbcGZc40eYu6wUbAxiUDD3gwSElNQ8Z6IhNLPCCdMM6KZORyaagAcXn4A==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Wed May 24 10:39:28 PDT 2017", System.out); - } -} - -class Entrust_G4 { - - // Owner: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - // Issuer: CN=Entrust Root Certification Authority - G4, OU="(c) 2015 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIGMjCCBBqgAwIBAgIRAKvsd/8bQQwHAAAAAFVl2AUwDQYJKoZIhvcNAQELBQAw\n" + - "gb4xCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQL\n" + - "Ex9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykg\n" + - "MjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAw\n" + - "BgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0\n" + - "MB4XDTE3MTEyMjIwMDQyMFoXDTMwMTIyMjIwMzQyMFowgboxCzAJBgNVBAYTAlVT\n" + - "MRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1\n" + - "c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNCBFbnRydXN0LCBJ\n" + - "bmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxLjAsBgNVBAMTJUVudHJ1c3Qg\n" + - "Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBMMU4wggEiMA0GCSqGSIb3DQEBAQUA\n" + - "A4IBDwAwggEKAoIBAQDcSG+caYQ4xcvf+dt8bgCEHorO0g5j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xZ\n" + - "AUZP6Gu+f9cEiHTA8NdYHCPLJWyFnIHWK+QuTFEnKYnOYxCeroLBNOO64e8JWZ39\n" + - "kZ22BBXhHzqOCCczS7JOJTRF+JgvWuxbFwRstj8qf3fE+JndWmq2FC4hTHtpuK5K\n" + - "ENuiRm5gdkXfsXmB+qB6y5gaajiTIMscGIcZIKTe2YdKrLoicvEz8k+loM7favik\n" + - "vzFioTNTDHYGx3mkfElBE7ycY8n+jZE3QBBv33k28MeQi7XNgEaMc4tYwoZIdE9A\n" + - "xVccXTzEQzka82dOkRB1dU0XZId9XAWv+CtNc2TjF6Wgx2seA/c6H8S0IfgQBIV2\n" + - "8iN2wZns2QFdawkdy3hMUqPnA++kuGhLW3GemsIY5dP/WxY8rd+OfLb/Ks9T1pCd\n" + - "28t7PQRcQsgkYmouzrOW9ASBvYqLLdhl4y+fFXff8RkPIKMNoYP06WJvRKmky9R/\n" + - "41/nXRas\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=validg4.entrust.net, SERIALNUMBER=1913605, OID.2.5.4.15=Private Organization, - // O=Entrust Datacard Limited, OID.1.3.6.1.4.1.311.60.2.1.2=Ontario, OID.1.3.6.1.4.1.311.60.2.1.3=CA, - // L=Ottawa, ST=Ontario, C=CA - // Issuer: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - // Serial number: 83790beb78eeb966007ad3dbf11d570 - // Valid from: Fri May 29 13:29:00 PDT 2020 until: Sun Aug 28 13:34:23 PDT 2022 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFpjCCBI6gAwIBAgIQCDeQvreO65ZgB609vxHVcDANBgkqhkiG9w0BAQsFADCB\n" + - "ujELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsT\n" + - "H1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3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gY\n" + - "eLACjvqO13vsMB8GA1UdIwQYMBaAFO5H0YVx8f0ttz+7PmNYdxdJQA6VMGgGCCsG\n" + - "AQUFBwEBBFwwWjAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZW50cnVzdC5uZXQw\n" + - "MwYIKwYBBQUHMAKGJ2h0dHA6Ly9haWEuZW50cnVzdC5uZXQvbDFuLWNoYWluMjU2\n" + - "LmNlcjAzBgNVHR8ELDAqMCigJqAkhiJodHRwOi8vY3JsLmVudHJ1c3QubmV0L2xl\n" + - "dmVsMW4uY3JsMB4GA1UdEQQXMBWCE3ZhbGlkZzQuZW50cnVzdC5uZXQwSwYDVR0g\n" + - "BEQwQjA3BgpghkgBhvpsCgECMCkwJwYIKwYBBQUHAgEWG2h0dHBzOi8vd3d3LmVu\n" + - "dHJ1c3QubmV0L3JwYTAHBgVngQwBATANBgkqhkiG9w0BAQsFAAOCAQEAOExxxxEk\n" + - "iAZZ4RJSWwI/CBQYAlUmd2wb/SBk9eYNAu/UL0XiAbwbOjH2dV6JHwAdwn0eoPR1\n" + - "KK/E1/OVoVibVBdxLMISPqdodRgHps6kGCOJxS8Zz8d3AEvx27EQ/Hg/EwIJZsUK\n" + - "dyb48V6a3XzExqLiwGu9oI9Ozm3/mo11ixmhvSFXH+FZf93qvvCSO+XTGGrLv5ja\n" + - "Tkazn/HgnwUBHd1TiO0jLhAdc+rZyd/SDjXMAXsa99zVfc2MY0Mb8+MohNHOwqYg\n" + - "tuYuirvtt9P0oteauL+iEBCRcqsmJaHGeaEyJH2QMxC5W22KpW245eHisW7rMoGQ\n" + - "9nbGmfe97p7bHQ==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revokedg4.entrust.net, SERIALNUMBER=1913605, OID.2.5.4.15=Private Organization, - // O=Entrust Datacard Limited, OID.1.3.6.1.4.1.311.60.2.1.2=Ontario, OID.1.3.6.1.4.1.311.60.2.1.3=CA, - // L=Ottawa, ST=Ontario, C=CA - // Issuer: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only", - // OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US - // Serial number: 24c5f46412b9dcc242a93017176979d6 - // Valid from: Fri May 29 13:36:00 PDT 2020 until: Sun Aug 28 13:40:43 PDT 2022 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIFqjCCBJKgAwIBAgIQJMX0ZBK53MJCqTAXF2l51jANBgkqhkiG9w0BAQsFADCB\n" + - "ujELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsT\n" + - "H1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAy\n" + - "MDE0IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEuMCwG\n" + - "A1UEAxMlRW50cnVzdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEwxTjAeFw0y\n" + - "MDA1MjkyMDM2MDBaFw0yMjA4MjgyMDQwNDNaMIHTMQswCQYDVQQGEwJDQTEQMA4G\n" + - "A1UECBMHT250YXJpbzEPMA0GA1UEBxMGT3R0YXdhMRMwEQYLKwYBBAGCNzwCAQMT\n" + - "AkNBMRgwFgYLKwYBBAGCNzwCAQITB09udGFyaW8xITAfBgNVBAoTGEVudHJ1c3Qg\n" + - "RGF0YWNhcmQgTGltaXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24x\n" + - "EDAOBgNVBAUTBzE5MTM2MDUxHjAcBgNVBAMTFXJldm9rZWRnNC5lbnRydXN0Lm5l\n" + - "dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN6Bvaj7EG752e15UQH9\n" + - "4o8+660Gi3caUAAu45vZebO7EfRgrz0zyalpiexmQzocGn6Zog2yVqmMZjrMY11a\n" + - "q96s0pzVKImnA/787G7J5lRncP+PM6/WGtUUGS2hHiif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h90OmIc8DY4arf\n" + - "widObgJe2H/VFScudLf5JMpBso2v772GYTRr5Tqqq3ouS9WvDf0NBvoStt1oiUMP\n" + - "oowesfNiaYa/rZzWRlhYNs089KUeLhjOZswtIY5LCyy+Wt3CHgXljGEQFgi7p59s\n" + - "gk0aMRYM9Gri26VbD5A=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Fri May 29 13:42:13 PDT 2020", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GlobalSignR6CA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GlobalSignR6CA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GlobalSignR6CA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GlobalSignR6CA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2019, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* - * @test - * @bug 8216577 8249176 - * @summary Interoperability tests with GlobalSign R6 CA - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath GlobalSignR6CA OCSP - * @run main/othervm -Djava.security.debug=certpath GlobalSignR6CA CRL - */ - - /* - * - * Obtain TLS test artifacts for GlobalSign R6 CA from: - * - * Valid TLS Certificates: - * https://valid.r6.roots.globalsign.com/ - * - * Revoked TLS Certificates: - * https://revoked.r6.roots.globalsign.com/ - */ -public class GlobalSignR6CA { - - // Owner: CN=GlobalSign Atlas R6 EV TLS CA 2020, O=GlobalSign nv-sa, C=BE - // Issuer: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R6 - // Serial number: 7803182afbecd89eb19309bb4a25bdaa - // Valid from: Mon Jul 27 17:00:00 PDT 2020 until: Sat Jul 27 17:00:00 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIGwDCCBKigAwIBAgIQeAMYKvvs2J6xkwm7SiW9qjANBgkqhkiG9w0BAQwFADBM\n" + - "MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xv\n" + - "YmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0z\n" + - "MDA3MjgwMDAwMDBaMFUxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWdu\n" + - "IG52LXNhMSswKQYDVQQDEyJHbG9iYWxTaWduIEF0bGFzIFI2IEVWIFRMUyBDQSAy\n" + - "MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtQ8IiN2Ukq/Clynv\n" + - "HhqugFQg5SXIyVO4ZRnxo0hNnaek78LRn4Bkaqcwv6Ls0Ftn4bK2zvBaS1zsfUTA\n" + - "vfup/s86zHCRv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CugKaAnhiVodHRwOi8vY3JsLmdsb2JhbHNpZ24uY29tL3Jv\n" + - "b3QtcjYuY3JsMFUGA1UdIAROMEwwQQYJKwYBBAGgMgEBMDQwMgYIKwYBBQUHAgEW\n" + - "Jmh0dHBzOi8vd3d3Lmdsb2JhbHNpZ24uY29tL3JlcG9zaXRvcnkvMAcGBWeBDAEB\n" + - "MA0GCSqGSIb3DQEBDAUAA4ICAQBD+97H2N1BgiliKQFrb+jcWjkmPP8cdF/eiBW1\n" + - "cEzOOhsuVqxbyIk8qdw3UueHSDjqWUjHYoo8TV3DLqUXmIy1Ks3MkESsFKeLpEbk\n" + - "VMZga0lbDnqqRc5a2yzrXmwVYDeWVeD20s5vPoKCnFzmcR+2v9TKD4bI6XWVl84q\n" + - "GzfFRVdY9f8KN+7891+47ZhptvxtNqJKVI2O+EAP/PvTpwes983LkFzsev4/+Qxs\n" + - "EszD7/pE+Byj3t9CMat2XoX0jfJjbEXgewFb/gCwHvqNKLNWrYfE9qN8b6qm4xQk\n" + - "qGQKTrFKsBJx4TU+h10qXDhpmOBswiJqoG16XCV32oSn0JUYvXVAvP6YjueOv/jr\n" + - "0ZMTWGh8wCz6v3XBaXR0rxDAz9GImpU+xPx2XjuHac7OnYbN+i8p7cJPUxABjHiA\n" + - "LWXIZtCn5ziCfvYC6+SCp8x9TPJzAIfJ4NKv/8SpvvzuchVkAQqlQaGFBEdkX84R\n" + - "I/WYYG+2BliFIpbQnfljYWCURbfsYz7+Zxb94+4yzva49p8T6lALoK3s2kqIVLKN\n" + - "s6qAnk/qX6JihkaR3W+iViHMC5tqQX/pd8QIXccF3PA2OdeNGU4iUNZqUbYB4VZd\n" + - "AaOaeaUl0LwAta6DB5w344eUIqDgaitSwQZBnxppmwL3tGzP1ero2e2RvBmphbxI\n" + - "atIdxA==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid.r6.roots.globalsign.com, - // O=GMO GlobalSign LTD, STREET="Springfield House, Sandling Road", OID.2.5.4.17=ME14 2LP, L=Maidstone, ST=Kent, - // C=GB, SERIALNUMBER=04705639, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB - // Issuer: CN=GlobalSign Atlas R6 EV TLS CA 2020, O=GlobalSign nv-sa, C=BE - // Serial number: 1aff2829dd8bf07aa65a7b3c920ca4b - // Valid from: Thu Aug 27 00:20:06 PDT 2020 until: Tue Sep 28 00:20:06 PDT 2021 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHyjCCBbKgAwIBAgIQAa/ygp3YvweqZaezySDKSzANBgkqhkiG9w0BAQsFADBV\n" + - "MQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTErMCkGA1UE\n" + - "AxMiR2xvYmFsU2lnbiBBdGxhcyBSNiBFViBUTFMgQ0EgMjAyMDAeFw0yMDA4Mjcw\n" + - "NzIwMDZaFw0yMTA5MjgwNzIwMDZaMIH6MRMwEQYLKwYBBAGCNzwCAQMTAkdCMR0w\n" + - "GwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjERMA8GA1UEBRMIMDQ3MDU2Mzkx\n" + - "CzAJBgNVBAYTAkdCMQ0wCwYDVQQIDARLZW50MRIwEAYDVQQHDAlNYWlkc3RvbmUx\n" + - "ETAPBgNVBBEMCE1FMTQgMkxQMSkwJwYDVQQJDCBTcHJpbmdmaWVsZCBIb3VzZSwg\n" + - "U2FuZGxpbmcgUm9hZDEbMBkGA1UECgwSR01PIEdsb2JhbFNpZ24gTFREMSYwJAYD\n" + - "VQQDDB12YWxpZC5yNi5yb290cy5nbG9iYWxzaWduLmNvbTCCASIwDQYJKoZIhvcN\n" + - "AQEBBQADggEPADCCAQoCggEBAMOxbh7fZVLUB06xxNBePa9vpOuAS5km1w8ngsTu\n" + - "SvH1LZnPFd4nu40fi8bPbHd4J2oRWZ28f7LKVQgBupn9knrTQxfTV361WpmwqCcH\n" + - "MxornKyHx4t5uGrtTtX2fYoNQQk330dIK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"-----END CERTIFICATE-----"; - - // Owner: CN=revoked.r6.roots.globalsign.com, - // O=GMO GlobalSign LTD, STREET="Springfield House, Sandling Road", OID.2.5.4.17=ME14 2LP, L=Maidstone, ST=Kent, - // C=GB, SERIALNUMBER=04705639, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.3=GB - // Issuer: CN=GlobalSign Atlas R6 EV TLS CA 2020, O=GlobalSign nv-sa, C=BE - // Serial number: 1df30d84796ac20c47da63b8e681e8f - // Valid from: Thu Aug 27 00:37:53 PDT 2020 until: Tue Sep 28 00:37:53 PDT 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHzzCCBbegAwIBAgIQAd8w2EeWrCDEfaY7jmgejzANBgkqhkiG9w0BAQsFADBV\n" + - "MQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTErMCkGA1UE\n" + - "AxMiR2xvYmFsU2lnbiBBdGxhcyBSNiBFViBUTFMgQ0EgMjAyMDAeFw0yMDA4Mjcw\n" + - "NzM3NTNaFw0yMTA5MjgwNzM3NTNaMIH8MRMwEQYLKwYBBAGCNzwCAQMTAkdCMR0w\n" + - "GwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjERMA8GA1UEBRMIMDQ3MDU2Mzkx\n" + - "CzAJBgNVBAYTAkdCMQ0wCwYDVQQIDARLZW50MRIwEAYDVQQHDAlNYWlkc3RvbmUx\n" + - "ETAPBgNVBBEMCE1FMTQgMkxQMSkwJwYDVQQJDCBTcHJpbmdmaWVsZCBIb3VzZSwg\n" + - "U2FuZGxpbmcgUm9hZDEbMBkGA1UECgwSR01PIEdsb2JhbFNpZ24gTFREMSgwJgYD\n" + - "VQQDDB9yZXZva2VkLnI2LnJvb3RzLmdsb2JhbHNpZ24uY29tMIIBIjANBgkqhkiG\n" + - "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvaNcp7bzmm02Z0S92ZzJ/ul3uQWz3EnBORc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cfeXlJ5b7I7GnFr61ycmZT/qupagUS1WDq/zfct\n" + - "QcB4QmnAzGe6kcqiDOSyIYWpiw09jha63KpJtJDWRemrlQI=\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Thu Aug 27 00:38:11 PDT 2020", System.out); - } -} - diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoDaddyCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoDaddyCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoDaddyCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoDaddyCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,346 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * @test - * @bug 8196141 - * @summary Interoperability tests with GoDaddy/Starfield CA - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath GoDaddyCA OCSP - * @run main/othervm -Djava.security.debug=certpath GoDaddyCA CRL - */ - -/* - * Obtain test artifacts for GoDaddy/Starfield CAs from: - * - * Go Daddy Root Certificate Authority - G2: - * valid: https://valid.gdig2.catest.godaddy.com/ - * expired: https://expired.gdig2.catest.godaddy.com/ - * revoked: https://revoked.gdig2.catest.godaddy.com/ - * - * Starfield Root Certificate Authority - G2: - * valid: https://valid.sfig2.catest.starfieldtech.com/ - * expired: https://expired.sfig2.catest.starfieldtech.com/ - * revoked: https://revoked.sfig2.catest.starfieldtech.com/ - */ -public class GoDaddyCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - // CRL check - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new GoDaddyGdig2().runTest(pathValidator); - new GoDaddySfig2().runTest(pathValidator); - } -} - -class GoDaddyGdig2 { - - // Owner: CN=Go Daddy Secure Certificate Authority - G2, - // OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", - // L=Scottsdale, ST=Arizona, C=US - // Issuer: CN=Go Daddy Root Certificate Authority - G2, O="GoDaddy.com, Inc.", - // L=Scottsdale, ST=Arizona, C=US - private static final String INT = "-----BEGIN CERTIFICATE-----\n" - + "MIIE0DCCA7igAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx\n" - + "EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT\n" - + "EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQD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YkaHR0cDovL2NybC5n\n" - + "b2RhZGR5LmNvbS9nZHJvb3QtZzIuY3JsMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEG\n" - + "CCsGAQUFBwIBFiVodHRwczovL2NlcnRzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkv\n" - + "MA0GCSqGSIb3DQEBCwUAA4IBAQAIfmyTEMg4uJapkEv/oV9PBO9sPpyIBslQj6Zz\n" - + "91cxG7685C/b+LrTW+C05+Z5Yg4MotdqY3MxtfWoSKQ7CC2iXZDXtHwlTxFWMMS2\n" - + "RJ17LJ3lXubvDGGqv+QqG+6EnriDfcFDzkSnE3ANkR/0yBOtg2DZ2HKocyQetawi\n" - + "DsoXiWJYRBuriSUBAA/NxBti21G00w9RKpv0vHP8ds42pM3Z2Czqrpv1KrKQ0U11\n" - + "GIo/ikGQI31bS/6kA1ibRrLDYGCD+H1QQc7CoZDDu+8CL9IVVO5EFdkKrqeKM+2x\n" - + "LXY2JtwE65/3YR8V3Idv7kaWKK2hJn0KCacuBKONvPi8BDAB\n" - + "-----END CERTIFICATE-----"; - - // 1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private - // Organization/serialNumber=5510922, C=US, ST=Arizona, L=Scottsdale, O=GoDaddy INC., CN=valid.gdig2.catest.godaddy.com - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHbzCCBlegAwIBAgIIC3Go9uPeseowDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNV\n" + - "BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRow\n" + - "GAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjEtMCsGA1UECxMkaHR0cDovL2NlcnRz\n" + - "LmdvZGFkZHkuY29tL3JlcG9zaXRvcnkvMTMwMQYDVQQDEypHbyBEYWRkeSBTZWN1\n" + - "cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR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U5frlWJWcOWUdZB\n" + - "6mVNcmUQMkYnjkg8+PQ782HGP0DvAfcIRDhSfXdIqzEk8MPUq1XHEOfwRzLpTiCN\n" + - "FQDQIt1LXnzESCUurJS8r4mxgaVLAwHFytOTDrQn0Xfs93dm0tnRGAg7iBg+N33V\n" + - "zOR4aqojdDUWa1Rr4WFqZMkZIxzREQCYC8HXSYqLA1oPuoMMog8dId7XSalBmGJ4\n" + - "KQVsZ0/Hpi0y9k/Zw5obGcEYJWMbuU1iaEkvdtXOiXEQfJ1WS+Yy55J4GSjpIiop\n" + - "qDZD88xA9r7ttzM/khao7jfIpVWG2HuX0JlHWdh3y9aegiw=\n" + - "-----END CERTIFICATE-----"; - - // 1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private - // Organization/serialNumber=5510922, C=US, ST=Arizona, L=Scottsdale, O=GoDaddy INC., CN=revoked.gdig2.catest.godaddy.com - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHdDCCBlygAwIBAgIIEBJV3vmogM8wDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNV\n" + - "BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRow\n" + - "GAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjEtMCsGA1UECxMkaHR0cDovL2NlcnRz\n" + - "LmdvZGFkZHkuY29tL3JlcG9zaXRvcnkvMTMwMQYDVQQDEypHbyBEYWRkeSBTZWN1\n" + - "cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0gRzIwHhcNMTcwOTE1MjMyMzAzWhcN\n" + - "MTkwOTE1MjMyMzAzWjCB1zETMBEGCysGAQQBgjc8AgEDEwJVUzEZMBcGCysGAQQB\n" + - "gjc8AgECEwhEZWxhd2FyZTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24x\n" + - "EDAOBgNVBAUTBzU1MTA5MjIxCz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Ma/Ca99BahaRWN7hiM+zS3Ly+l6G\n" + - "7kqAkBFuJWbbZImADZ2RPldY6hBzTk6MT2hLCV40UD8JqwJo+qq7nGfJdTaFyZI6\n" + - "nJvrVATO7jL64YFP3xlVi8EQaCeKdZdn+BCCNA/ja0mWMj8EU9Islg==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, null, System.out); - } -} - -class GoDaddySfig2 { - - // Owner: CN=Starfield Secure Certificate Authority - G2, - // OU=http://certs.starfieldtech.com/repository/, O="Starfield Technologies, Inc.", - // L=Scottsdale, ST=Arizona, C=US - // Issuer: CN=Starfield Root Certificate Authority - G2, - // O="Starfield Technologies, Inc.", L=Scottsdale, ST=Arizona, C=US - private static final String INT = "-----BEGIN CERTIFICATE-----\n" - + "MIIFADCCA+igAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx\n" - + "EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT\n" - + "HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs\n" - + "ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTExMDUwMzA3MDAw\n" - + "MFoXDTMxMDUwMzA3MDAwMFowgcYxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6\n" - + "b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj\n" - + "aG5vbG9naWVzLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydHMuc3RhcmZpZWxk\n" - + "dGVjaC5jb20vcmVwb3NpdG9yeS8xNDAyBgN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37hQYcxTUUApS8L0\n" - + "rjpf5MqtJsxOYUPl/VemN3DOQyuwlMOS6eFfqhBJt2nk4NAfZKQrzR9voPiEJBjO\n" - + "eT2pkb9UGBOJmVQRDVXFJgt5T1ocbvlj2xSApAer+rKluYjdkf5lO6Sjeb6JTeHQ\n" - + "sPTIFwwKlhR8Cbds4cLYVdQYoKpBaXAko7nv6VrcPuuUSvC33l8Odvr7+2kDRUBQ\n" - + "7nIMpBKGgc0T0U7EPMpODdIm8QC3tKai4W56gf0wrHofx1l7\n" - + "-----END CERTIFICATE-----"; - - // 1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Arizona/businessCategory=Private - // Organization/serialNumber=R17247416, C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, LLC, - // CN=valid.sfig2.catest.starfieldtech.com - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHuzCCBqOgAwIBAgIIaZoUcUIjkGwwDQYJKoZIhvcNAQELBQAwgcYxCzAJBgNV\n" + - "BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUw\n" + - "IwYDVQQKExxTdGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTMwMQYDVQQLEypo\n" + - "dHRwOi8vY2VydHMuc3RhcmZpZWxkdGVjaC5jb20vcmVwb3NpdG9yeS8xNDAyBgNV\n" + - "BAMTK1N0YXJmaWVsZCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0gRzIw\n" + - "HhcNMTcwOTE3MDM0ODAxWhcNMTkwOTE3MDM0ODAxWjCB6zETMBEGCysGAQQBgjc8\n" + - "AgEDEwJVUzEYMBYGCysGAQQBgjc8AgECEwdBcml6b25hMR0wGwYDVQQPExRQcml2\n" + - "YXRlIE9yZ2FuaXphdGlvbjESMBAGA1UEBRMJUjE3MjQ3NDE2MQswCQYDVQQGEwJV\n" + - "UzEQMA4GA1UECBMHQXJpem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541E3M6q6JbEBqZJFY8gBWwYqHH0\n" + - "xNGahm5++v4trFFCJzSfvfV1v+rnqy8tRivi7ZFLXWCcSyAqMH+T9Q36lKeFtaw4\n" + - "Sapf+dh2yrd2IBLW5eaAD13nCAjO/W0GuC7zw4+4mhW5+DTVJXrCkK5XddkVLhML\n" + - "k5pMoIv5EsFIm0Cs+DfF\n" + - "-----END CERTIFICATE-----"; - - // 1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Arizona/businessCategory=Private - // Organization/serialNumber=R17247416, C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, LLC, - // CN=revoked.sfig2.catest.starfieldtech.com - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHwTCCBqmgAwIBAgIJAPc1qVz+WDxpMA0GCSqGSIb3DQEBCwUAMIHGMQswCQYD\n" + - "VQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEl\n" + - "MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEzMDEGA1UECxMq\n" + - "aHR0cDovL2NlcnRzLnN0YXJmaWVsZHRlY2guY29tL3JlcG9zaXRvcnkvMTQwMgYD\n" + - "VQQDEytTdGFyZmllbGQgU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcy\n" + - "MB4XDTE3MDkxOTEzMDkwMVoXDTE5MDkxOTEzMDkwMVowge0xEzARBgsrBgEEAYI3\n" + - "PAIBAxMCVVMxGDAWBgsrBgEEAYI3PAIBAhMHQXJpem9uYTEdMBsGA1UEDxMUUHJp\n" + - "dmF0ZSBPcmdhbml6YXRpb24xEjAQBgNVBAUTCVIxNzI0NzQxNjELMAkGA1UEBhMC\n" + - "VVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJDAiBgNV\n" + - "BAoTG1N0YXJmaWVsZCBUZWNobm9sb2dpZXMs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PxX2ur57zJE\n" + - "9ADWoYK/7gYVba0JmLV4nQltDPp06nOYT9imxBWTrFahgPx1jOQDLgIpitkjyCy4\n" + - "xpmxUk8L6yc3O3aSD9OU/fzk/t/d\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, null, System.out); - } -} - diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoogleCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoogleCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoogleCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GoogleCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,621 +0,0 @@ -/* - * Copyright (c) 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8307134 - * @summary Interoperability tests with Google's GlobalSign R4 and GTS Root certificates - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath GoogleCA OCSP - * @run main/othervm -Djava.security.debug=certpath GoogleCA CRL - */ - -/* - * Obtain TLS test artifacts for Google CAs from: - * - * https://pki.goog/repository/ - */ -public class GoogleCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - boolean ocspEnabled = false; - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - ocspEnabled = true; - } - - new GoogleGSR4().runTest(pathValidator); - new GoogleGTSR1().runTest(pathValidator); - new GoogleGTSR2().runTest(pathValidator); - new GoogleGTSR3().runTest(pathValidator); - new GoogleGTSR4().runTest(pathValidator); - } -} - -class GoogleGSR4 { - - // Owner: CN=GTS CA 2D4, O=Google Trust Services LLC, C=US - // Issuer: CN=GlobalSign, O=GlobalSign, OU=GlobalSign ECC Root CA - R4 - // Serial number: 21668f1cd0a2a8f847d8aad34 - // Valid from: Tue Oct 04 17:00:42 PDT 2022 until: Wed Sep 29 17:00:42 PDT 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDBDCCAqugAwIBAgINAhZo8c0KKo+EfYqtNDAKBggqhkjOPQQDAjBQMSQwIgYD\n" + - "VQQLExtHbG9iYWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2Jh\n" + - "bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMjIxMDA1MDAwMDQyWhcNMjcw\n" + - "OTMwMDAwMDQyWjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0\n" + - "IFNlcnZpY2VzIExMQzETMBEGA1UEAxMKR1RTIENBIDJENDBZMBMGByqGSM49AgEG\n" + - "CCqGSM49AwEHA0IABPQdCdV61990MPueGTVpXAjRmp2JIxt0Yuy59RZYT/XKg1lN\n" + - "gpRc0eh/bHtpehigtqe+llKTiVEkMhSMURoQQsOjggFyMIIBbjAOBgNVHQ8BAf8E\n" + - "BAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQI\n" + - "MAYBAf8CAQAwHQYDVR0OBBYEFKiI2Yo5rGXVgks3qJVsZUPNRAHgMB8GA1UdIwQY\n" + - "MBaAFFSwe61FuOJAf/sKbvu+M8k8o4TVMGYGCCsGAQUFBwEBBFowWDAlBggrBgEF\n" + - "BQcwAYYZaHR0cDovL29jc3AucGtpLmdvb2cvZ3NyNDAvBggrBgEFBQcwAoYjaHR0\n" + - "cDovL3BraS5nb29nL3JlcG8vY2VydHMvZ3NyNC5kZXIwMgYDVR0fBCswKTAnoCWg\n" + - "I4YhaHR0cDovL2NybC5wa2kuZ29vZy9nc3I0L2dzcjQuY3JsME0GA1UdIARGMEQw\n" + - "CAYGZ4EMAQIBMDgGCisGAQQB1nkCBQMwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly9w\n" + - "a2kuZ29vZy9yZXBvc2l0b3J5LzAKBggqhkjOPQQDAgNHADBEAiBi+ikli1YBHQGs\n" + - "b5mnyBo5mydw04o386BPgaPpiBzgagIgbcpwQJCalLIekv8XRMoWFr3nV5XJfWRU\n" + - "5QPpOX0rXbg=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=good.gsr4.demo.pki.goog - // Issuer: CN=GTS CA 2D4, O=Google Trust Services LLC, C=US - // Serial number: 4c435754ee6e013c10efaff908a58cbb - // Valid from: Mon Mar 27 12:41:45 PDT 2023 until: Sun Jun 25 12:41:44 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEsTCCBFegAwIBAgIQTENXVO5uATwQ76/5CKWMuzAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxM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y9ndHMyZDQvSUlXMzNMVUVwV3cuY3JsMIIBBAYKKwYB\n" + - "BAHWeQIEAgSB9QSB8gDwAHcA6D7Q2j71BjUy51covIlryQPTy9ERa+zraeF3fW0G\n" + - "vW4AAAGHJM62ygAABAMASDBGAiEAkeiqmfYYCVEmGA12/RJUZPdmxRP2ZXF0Xm30\n" + - "Oz+q2tgCIQCgSYqT/6RH+PCOauOVW4uaoshT+HfqurghVCzwGgBFvwB1ALc++yTf\n" + - "nE26dfI5xbpY9Gxd/ELPep81xJ4dCYEl7bSZAAABhyTOttoAAAQDAEYwRAIgBXao\n" + - "3Pry1nCHu3bngW3q3CHSLzmNHmO4cXMSdN2sAOkCIDE5DUyok3TRsOIHu1QTB0R2\n" + - "UxPeFm9KS73TBT8JEZykMAoGCCqGSM49BAMCA0gAMEUCIG1m91VOq3tghyLPA6YR\n" + - "/Pkq+gQylyM8wGJgnRMRE0lhAiEAxBgYXImtVqbfymq2MYwhV9KmG9gPIfqN6qWi\n" + - "lzblUM0=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.gsr4.demo.pki.goog - // Issuer: CN=GTS CA 2D4, O=Google Trust Services LLC, C=US - // Serial number: 1f9bd55e26716b3710b2614cec6fff02 - // Valid from: Mon Mar 27 12:48:37 PDT 2023 until: Sun Jun 25 12:48:36 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIEtzCCBFygAwIBAgIQH5vVXiZxazcQsmFM7G//AjAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxMKR1RTIENBIDJENDAeFw0yMzAzMjcxOTQ4MzdaFw0yMzA2MjUxOTQ4\n" + - "MzZaMCUxIzAhBgNVBAMTGnJldm9rZWQuZ3NyNC5kZW1vLnBraS5nb29nMIIBIjAN\n" + - "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCg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x1ScnsOf9R9N3eyPMJtH33C\n" + - "mOrRCOodG8QXmE0CIHwNJC5E53BVmfMzZwJH9f2BiUx31SGHWFvG283zVtX/AHUA\n" + - "6D7Q2j71BjUy51covIlryQPTy9ERa+zraeF3fW0GvW4AAAGHJNUxnAAABAMARjBE\n" + - "AiAI7pcrKatsz0G4QYPKmS74VQVEgnHqgKSoqv0ghTJXTgIgPyoYubz4MEHYirBu\n" + - "69BLC2jioXr8+wS7MK1IPqjdH44wCgYIKoZIzj0EAwIDSQAwRgIhAI4NdZ5JwTuW\n" + - "P+RH2bsAc5xrb804G9mOc3WMRVxTUKesAiEA/jHMJ2YdPv0WXKjKY7nUyFjUPdin\n" + - "BHRHfBeltynaFzU=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Mar 27 13:49:33 PDT 2023", System.out); - } -} - -class GoogleGTSR1 { - - // Owner: CN=GTS CA 1D4, O=Google Trust Services LLC, C=US - // Issuer: CN=GTS Root R1, O=Google Trust Services LLC, C=US - // Serial number: 2008eb2023336658b64cddb9b - // Valid from: Wed Aug 12 17:00:42 PDT 2020 until: Wed Sep 29 17:00:42 PDT 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFjDCCA3SgAwIBAgINAgCOsgIzNmWLZM3bmzANBgkqhkiG9w0BAQsFADBHMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU\n" + - "MBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMjAwODEzMDAwMDQyWhcNMjcwOTMwMDAw\n" + - "MDQyWjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp\n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wXUr0rAPc924vuSVbKQuYw3nLflLfLh5AYWEeVl/Du18QAWUMdcJ6o/q\n" + - "FZbhXkBH0PNcw97thaf2BeoDYY9Ck/b+UGluhx06zd4EBf7H9P84nnrwpR+4GBDZ\n" + - "K+Xh3I0tqJy2rgOqNDflr5IMQ8ZTWA3yltakzSBKZ6XpF0PpqyCRvp/NCGv2KX2T\n" + - "uPCJvscp1/m2pVTtyBjYPRQ+QuCQGAJKjtN7R5DFrfTqMWvYgVlpCJBkwlu7+7KY\n" + - "3cTIfzE7cmALskMKNLuDz+RzCcsYTsVaU7Vp3xL60OYhqFkuAOOxDZ6pHOj9+OJm\n" + - "YgPmOT4X3+7L51fXJyRH9KfLRP6nT31D5nmsGAOgZ26/8T9hsBW1uo9ju5fZLZXV\n" + - "VS5H0HyIBMEKyGMIPhFWrlt/hFS28N1zaKI0ZBGD3gYgDLbiDT9fGXstpk+Fmc4o\n" + - "lVlWPzXe81vdoEnFbr5M272HdgJWo+WhT9BYM0Ji+wdVmnRffXgloEoluTNcWzc4\n" + - "1dFpgJu8fF3LG0gl2ibSYiCi9a6hvU0TppjJyIWXhkJTcMJlPrWx1VytEUGrX2l0\n" + - "JDwRjW/656r0KVB02xHRKvm2ZKI03TglLIpmVCK3kBKkKNpBNkFt8rhafcCKOb9J\n" + - "x/9tpNFlQTl7B39rJlJWkR17QnZqVptFePFORoZmFzM=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=good.gtsr1.demo.pki.goog - // Issuer: CN=GTS CA 1D4, O=Google Trust Services LLC, C=US - // Serial number: 19c08d5cde41fc84108f54c8d2a1aeca - // Valid from: Mon Mar 27 12:33:43 PDT 2023 until: Sun Jun 25 12:33:42 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFcjCCBFqgAwIBAgIQGcCNXN5B/IQQj1TI0qGuyjANBgkqhkiG9w0BAQsFADBG\n" + - "MQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0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C2G\n" + - "K2h0dHA6Ly9jcmxzLnBraS5nb29nL2d0czFkNC92My1EUW1sYi1ZWS5jcmwwggEC\n" + - "BgorBgEEAdZ5AgQCBIHzBIHwAO4AdQC3Pvsk35xNunXyOcW6WPRsXfxCz3qfNcSe\n" + - "HQmBJe20mQAAAYckx1OMAAAEAwBGMEQCICQ4Do1cKFsqmm/swKZkdM/qGluDbctL\n" + - "tIgp0YnoZTlEAiByAeAEaVQiU27AnpUerimnjPnThQq26vqvnWdstb0mwgB1AK33\n" + - "vvp8/xDIi509nB4+GGq0Zyldz7EMJMqFhjTr3IKKAAABhyTHU7UAAAQDAEYwRAIg\n" + - "WAIAOov42kcgOj0rYO3qb4/HTsW3o69x4IKd8ycsaVkCICIQUaeKwNp4aW/civO9\n" + - "No/v5Ner5bmlwheqFAJcR/HCMA0GCSqGSIb3DQEBCwUAA4IBAQBEKKdwuzuAhdir\n" + - "3hbPQIosD6H9vatr8tExWCDmw+PHOoiWIUTBu5fVZPQ27EgehTIA6kNhQj2g7fkF\n" + - "Bd5zAl4k7WdsDZCeOHml6XXQZHvc+p4DYBKTTt3h81lsMLw8aWCOaiSmrQ0hZS/E\n" + - "iuaqvlOFpOTd0x+MN2qcU14hi8SKxBgpraqR/s7OCwUFltxcPq0GAybzDGc9lgB+\n" + - "Jt56QviN641s7hxThyGhFIHSePgWuwbT1grJKQiSW35yI4PJO90HoCpd2MLrC5Ic\n" + - "B89ykY8mQcx+naGPZQdwdpx9GvKwSZdn+cq3kZwD66iXnwhqmiEdq4eBZr8ygSya\n" + - "lnGV2OW+\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.gtsr1.demo.pki.goog - // Issuer: CN=GTS CA 1D4, O=Google Trust Services LLC, C=US - // Serial number: c414c34e6c2cc66c102b8d3502be3bb4 - // Valid from: Mon Mar 27 12:42:39 PDT 2023 until: Sun Jun 25 12:42:38 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIFfDCCBGSg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VHREEHzAdghtyZXZva2VkLmd0c3IxLmRlbW8ucGtpLmdv\n" + - "b2cwIQYDVR0gBBowGDAIBgZngQwBAgEwDAYKKwYBBAHWeQIFAzA8BgNVHR8ENTAz\n" + - "MDGgL6AthitodHRwOi8vY3Jscy5wa2kuZ29vZy9ndHMxZDQvODJFckFFQVVsR1ku\n" + - "Y3JsMIIBBQYKKwYBBAHWeQIEAgSB9gSB8wDxAHYArfe++nz/EMiLnT2cHj4YarRn\n" + - "KV3PsQwkyoWGNOvcgooAAAGHJM+cawAABAMARzBFAiB568monxGD3NiHsqNmsy+t\n" + - "IL4kCc71UNCCJthgnlL7HgIhAKSYf7P7CFO2wWdAt8LBMrsLoip9lytrinj0JR8R\n" + - "CYK9AHcAtz77JN+cTbp18jnFulj0bF38Qs96nzXEnh0JgSXttJkAAAGHJM+cZAAA\n" + - "BAMASDBGAiEAj8nBf1ihput8Gb8qCqVgvqAxPv9t4xLVhWg3tqv8gGMCIQDPiNbu\n" + - "vsyOi9nE6pDm86nggExXRa13wwCtr2wjAn5IpDANBgkqhkiG9w0BAQsFAAOCAQEA\n" + - "ezldM/NCUH58eXPZnbPaMMKrT5oNBxv+hypDy96+PyAqKtbC2bK+7sobGMZkfpG5\n" + - "8dW0mFmfazzjgbZUj54ZVHG4KaHeit8Nq1s07wh2Jo1c2JQdKxEXAOItax/IOfEd\n" + - "tqSg8AwSmhogQeiA7EXRspw4dYXL5uP/8jPPqByMI3PRmm3y7wyQLKNlNAfSgn7m\n" + - "wkrZxMRAENML4JND5UKxg7zo9e/Wvf4UPtEVVZaEj6ZxOe4JljvErCtayaw03t5p\n" + - "I18IAhXRpqm8JG1UGWjn49O8vkjB0bf/7iVXXI4rg6gGVia+HFuxKVGk5OQzo4Qd\n" + - "wBl6yOc8tpUH3phFPYbiMg==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Mar 27 13:43:25 PDT 2023", System.out); - } -} - -class GoogleGTSR2 { - - // Owner: CN=GTS CA 1D8, O=Google Trust Services LLC, C=US - // Issuer: CN=GTS Root R2, O=Google Trust Services LLC, C=US - // Serial number: 219c15ac025a1b0a5c1d9d501 - // Valid from: Tue Oct 04 17:00:42 PDT 2022 until: Wed Sep 29 17:00:42 PDT 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFjDCCA3SgAwIBAgINAhnBWsAlobClwdnVATANBgkqhkiG9w0BAQsFADBHMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU\n" + - "MBIGA1UEAxMLR1RTIFJvb3QgUjIwHhcNMjIxMDA1MDAwMDQyWhcNMjcwOTMwMDAw\n" + - "MDQyWjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp\n" + - "Y2VzIExMQzETMBEGA1UEAxMKR1RTIENBIDFEODCCASIwDQYJKoZIhvcNAQEBBQAD\n" + - "ggEPADCCAQoCggEBAKgpBAgi9bhOp5nCIELI/W+1rMoxNH3isu2LuDI3pPEPYJ0o\n" + - "YDxXB1zKHvUqn1VWDlF+K4vLPzjTRv2MUw8fHH9IAd/Rx+mrUHUxffTPU5O41tPj\n" + - "OdzFRO+FOr5RqZfbtXWbEUNyv7wyyCYr9gaDvDeQgDnHTfHAafdoDracNLm2LS3r\n" + - "8iznvJltsboRm+fBwTH99nHciN/h/hHEWlRriUGZ+Cz+5YVB9Tm4gAOByyYYbAa4\n" + - "ES0PhzkIUHaq+56cTDVhK0DM5ZtnZJqV8amhBFssswPttAXT9pNCzoDLCtxeZ2Lw\n" + - "r7bcaGaDcuDmv4j8zAw3BOR73O0Xk1VcBYPBBUcCAwEAAaOCAXYwggFyMA4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irG8/eKQxFzckbhL5AD8BJS3wkF7O7A8Gd+2VvSWhmEQzzOBHcvT/lqrCSe0\n" + - "7R7CV/Pw4E9C2GBLGfw8opxGXrdfJRjU6nHf5c+tC4xIjH/i3PQjaIFLG3D60mav\n" + - "0nkS92iorZl2dCiHTKxaD/J4B6VV03lpEcUdVg4WeGAmTClsXUnMOjCnlVYMLg9v\n" + - "URq0LbylxbGBelBrCNyqBS5UO6+9F4/Yi4vzoIvvbJ0=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=good.gtsr2.demo.pki.goog - // Issuer: CN=GTS CA 1D8, O=Google Trust Services LLC, C=US - // Serial number: 428fe99edb0df46e1008e4452f6cbfd2 - // Valid from: Mon Mar 27 12:52:12 PDT 2023 until: Sun Jun 25 12:52:11 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFdDCCBFygAwIBAgIQQo/pntsN9G4QCORFL2y/0jANBgkqhkiG9w0BAQsFADBG\n" + - "MQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExM\n" + - "QzETMBEGA1UEAxMKR1RTIENBIDFEODAeFw0yMzAzMjcxOTUyMTJaFw0yMzA2MjUx\n" + - "OTUyMTFaMCMxITAfBgNVBAMTGGdvb2QuZ3RzcjIuZGVtby5wa2kuZ29vZzCCASIw\n" + - "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMaC0h20vohsggOQ0XGL5ca3Gqyf\n" + - "2n44PhYBrhzPpbq9/Mk9BKYYFy9osH0HwTFkYRYnI5fDeK6s/7svufiEwH8LtXK7\n" + - "A3juxf3k65cJ8M5bbBwDDW7Prgp86ueUd6pzqv23rLPc9Kv6vvtNYzgaTd4COU38\n" + - "3zFnuudAh8gvEbIQD+Nqis+kc4kEO3JfZBlAF883YRQZRpm6c4bWxKm1Atco53/6\n" + - "fYOota/XUgdJ8zQWOH1f9iaKX3kiDn76djxT9v/8MrcK2gRkHJJDo72Ht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+ - "veCSrfeVav2tDkx8s9VU7VD+lApip1mdqOGsqkCkeaA5hsGfhqleQFwsOAjduBFA\n" + - "nSV6KgiqFsgHSuS9zuSp2aVe8xhxq6mpr4LngkeUDc32mB9tW9AMaiYp8UeYyFGq\n" + - "hvjUb7/H2wFlT6qO+Qp/+hmfulKqNnrSzpZLIl+x2EBn3L6CFe5xaKzNaANgbShI\n" + - "cQsyKdaUrSAzNJZWnHwaAyQ1msqqXXoVzKmjAGMgZrXZNxv8Lh9V1v+F9WHDIjeQ\n" + - "TtahntIgq38eGtZAnyjdrUtfQwBlQI3zaE0n7n6Fq8ocglJE5woRlL/eTmSKiZr9\n" + - "rrEY0sJ0fCw=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.gtsr2.demo.pki.goog - // Issuer: CN=GTS CA 1D8, O=Google Trust Services LLC, C=US - // Serial number: df9af5c19e9dbdf6107cb03548ffbd06 - // Valid from: Mon Mar 27 12:45:09 PDT 2023 until: Sun Jun 25 12:45:08 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIFejCCBGKgAwIBAgIRAN+a9cGenb32EHywNUj/vQYwDQYJKoZIhvcNAQELBQAw\n" + - "RjELMAkGA1UEBhMCVVMxIjAgBgNVBAoTGUdvb2dsZSBUcnVzdCBTZXJ2aWNlcyBM\n" + - "TEMxEzARBgNVBAMTCkdUUyBDQSAxRDgwHhcNMjMwMzI3MTk0NTA5WhcNMjMwNjI1\n" + - "MTk0NTA4WjAmMSQwIgYDVQQDExtyZXZva2VkLmd0c3IyLmRlbW8ucGtpLmdvb2cw\n" + - "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDFJUSh0aOOjj6BXJqBFDOD\n" + - "GFjnr1VKDfWYdGWfB3QNhcbjz7qJRLeZDSYQZ3H2D5pkOQhl6xYLOZ1L0v+0TWW9\n" + - "5lCXQ476jdZXzPlOC29gYFX4VzS9w92ochg0dUhHdzKcWsqBjqChZdudGydY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aSnTCc2ceQj/asKFYRRGbwzXTnaDbvNMMeB4ogEXAIgZykyJVPh\n" + - "4Sfkroi8tvV6dwxexp0dT2EXHAmr+/GzZU0wDQYJKoZIhvcNAQELBQADggEBAHVn\n" + - "uWbk/OaljXKeyhlDCgdvnzJGCFQXwGyIJzNDkCs8k3iA1iwJKArvpkczxnCBxCPE\n" + - "imW2MHWCayT9JXKuO4ppU0oTh6GYvRV6DV1OkuWXsna7+dGf3+tkm9k0wauI6J8X\n" + - "H1T8Dq3W0+S+8UNSftduYSR1wTcN15OxIzlZ/FrV3LLRDxH2RKSsXfXBLgP1befh\n" + - "m+8SPQTpZ5NdMl7my0gmVgNF5ZIbFiHYzJkF2vS4iXJCI6fTWyoA1u/7jQyHdLOy\n" + - "pY0s6gKWEwwtpYC1lWI6ek/wLfuNrJbiRRiRs8e3HHQymn8K3T1PM+7n8huDy95b\n" + - "f1EgLMjvEtx6xpIqrqg=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Mar 27 13:45:40 PDT 2023", System.out); - } -} - -class GoogleGTSR3 { - - // Owner: CN=GTS CA 2D3, O=Google Trust Services LLC, C=US - // Issuer: CN=GTS Root R3, O=Google Trust Services LLC, C=US - // Serial number: 21668d8d65bc4320e5b8e5e76 - // Valid from: Tue Oct 04 17:00:42 PDT 2022 until: Wed Sep 29 17:00:42 PDT 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDIDCCAqagAwIBAgINAhZo2NZbxDIOW45edjAKBggqhkjOPQQDAzBHMQswCQYD\n" + - "VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG\n" + - "A1UEAxMLR1RTIFJvb3QgUjMwHhcNMjIxMDA1MDAwMDQyWhcNMjcwOTMwMDAwMDQy\n" + - "WjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz\n" + - "IExMQzETMBEGA1UEAxMKR1RTIENBIDJEMzBZMBMGByqGSM49AgEGCCqGSM49AwEH\n" + - "A0IABGQQXn8LoR0OtyBn+KkEav3utA7WFBgWEb/8bXVlW6xJLTZJIC04lsNmNKWJ\n" + - "P/fwHYfrZcx1o4vvOUTO9OD/7pijggF2MIIBcjAOBgNVHQ8BAf8EBAMCAYYwHQYD\n" + - "VR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAw\n" + - "HQYDVR0OBBYEFL+pU78badiFKTSaaUPL1nrUmf9tMB8GA1UdIwQYMBaAFMHxJrqg\n" + - "La6Fgc/T8SoSvbgKZ/28MGgGCCsGAQUFBwEBBFwwWjAmBggrBgEFBQcwAYYaaHR0\n" + - "cDovL29jc3AucGtpLmdvb2cvZ3RzcjMwMAYIKwYBBQUHMAKGJGh0dHA6Ly9wa2ku\n" + - "Z29vZy9yZXBvL2NlcnRzL2d0c3IzLmRlcjA0BgNVHR8ELTArMCmgJ6AlhiNodHRw\n" + - "Oi8vY3JsLnBraS5nb29nL2d0c3IzL2d0c3IzLmNybDBNBgNVHSAERjBEMAgGBmeB\n" + - "DAECATA4BgorBgEEAdZ5AgUDMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vcGtpLmdv\n" + - "b2cvcmVwb3NpdG9yeS8wCgYIKoZIzj0EAwMDaAAwZQIxAO3wG4U11INX3hl2UyCn\n" + - "0A/upBaO+BBzX1OiQx7UfmMXc65kqkdIcNzZc6G6EWnNVAIwBG0LuIKWXfYc+Wbk\n" + - "STfMvwatUvd6QjdIKsYF0e8Hiaav+hLI0DzOuJcDPFtfYIyY\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=good.gtsr3.demo.pki.goog - // Issuer: CN=GTS CA 2D3, O=Google Trust Services LLC, C=US - // Serial number: 7d08ad6716e51d1210bfc149e3d0af19 - // Valid from: Mon Mar 27 12:37:41 PDT 2023 until: Sun Jun 25 12:37:40 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEszCCBFmgAwIBAgIQfQitZxblHRIQv8FJ49CvGTAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxMKR1RTIENBIDJEMzAeFw0yMzAzMjcxOTM3NDFaFw0yMzA2MjUxOTM3\n" + - "NDBaMCMxITAfBgNVBAMTGGdvb2QuZ3RzcjMuZGVtby5wa2kuZ29vZzCCASIwDQYJ\n" + - "KoZIhvcNAQEBBQADggEPADCCAQoCggEBAL7R40feuILVPC65FhoVh3kZ8mJuEKpJ\n" + - "SiSB9gbKRkaKBr4kHOm7+sa0RkAm3Zgbomd2JGiJbYYcQ4lY8MMlXruFLLY+0AMf\n" + - "Pf5mQbn6i+oSyfaNwV0Hk1q1MhZL5WSKLywXS0NVw50JGQw/SiIRhmR22DdOtxuh\n" + - "VC7ZOebYTbHzTBSYTxvoyJZ0bGUQMWQ0rI2lzOp+2kqSTDMmRejXUNm14ZrsdXUb\n" + - "F8nOunZpT5ppESFvsK7TFrWJlAFHNVxJjPkNaRyfIaR7G+hORoV5tHGaNeTzmFkO\n" + - "3ySGcRlvL41IWqBN4LwLiS6QN+Je7nIBDojEPTBVhPCzP++1uLKEKusCAwEAAaOC\n" + - "An8wggJ7MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNV\n" + - "HRMBAf8EAjAAMB0GA1UdDgQWBBRRhq17jer1cVfi0eFV+LIwk+Lk8jAfBgNVHSME\n" + - "GDAWgBS/qVO/G2nYhSk0mmlDy9Z61Jn/bTB4BggrBgEFBQcBAQRsMGowNQYIKwYB\n" + - "BQUHMAGGKWh0dHA6Ly9vY3NwLnBraS5nb29nL3MvZ3RzMmQzL09KOENlY2cwdWNV\n" + - "MDEGCCsGAQUFBzAChiVodHRwOi8vcGtpLmdvb2cvcmVwby9jZXJ0cy9ndHMyZDMu\n" + - "ZGVyMCMGA1UdEQQcMBqCGGdvb2QuZ3RzcjMuZGVtby5wa2kuZ29vZzAhBgNVHSAE\n" + - "GjAYMAgGBmeBDAECATAMBgorBgEEAdZ5AgUDMDwGA1UdHwQ1MDMwMaAvoC2GK2h0\n" + - "dHA6Ly9jcmxzLnBraS5nb29nL2d0czJkMy9WREItNVdJSTVRSS5jcmwwggEEBgor\n" + - "BgEEAdZ5AgQCBIH1BIHyAPAAdgDoPtDaPvUGNTLnVyi8iWvJA9PL0RFr7Otp4Xd9\n" + - "bQa9bgAAAYckzOfmAAAEAwBHMEUCIF0wxIlFnHLMan20Gtbnia+mzuA1Re0dhoIS\n" + - "wOAO7aC4AiEA7cYfSflOAA0DLxHsHAXpVs2LuLYlq34bSxbyUa85UyYAdgCzc3cH\n" + - "4YRQ+GOG1gWp3BEJSnktsWcMC4fc8AMOeTalmgAAAYckzOf5AAAEAwBHMEUCICza\n" + - "2nef9GWr9tF/ZXxhMYP15JQsdWPWmpQkdS/xUBWyAiEAs9AaeMarT7EaBVoSatAT\n" + - "Poj6cOhdvF/uDOHigyQdVd8wCgYIKoZIzj0EAwIDSAAwRQIhALv6jaEFgAIe3NbX\n" + - "87YEjhMMymK7wl435DQD9syoOEx2AiBbcYXr6nLNWA1pPoRiA1WvHgTVJFWftpYt\n" + - "e8CkUXnIxA==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked.gtsr3.demo.pki.goog - // Issuer: CN=GTS CA 2D3, O=Google Trust Services LLC, C=US - // Serial number: 7ffa6a827df64c6010ebc47b5ca3eda7 - // Valid from: Mon Mar 27 12:45:58 PDT 2023 until: Sun Jun 25 12:45:57 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIEuTCCBF+gAwIBAgIQf/pqgn32TGAQ68R7XKPtpzAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxMKR1RTIENBIDJEMzAeFw0yMzAzMjcxOTQ1NThaFw0yMzA2MjUxOTQ1\n" + - "NTdaMCYxJDAiBgNVBAMTG3Jldm9rZWQuZ3RzcjMuZGVtby5wa2kuZ29vZzCCASIw\n" + - "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKpn78KglifqiS3f5hPLH64og4aH\n" + - "7a1tDBza2ebTLYB74i1u65EIENCyzvz6OYvh8kKzhqZMPFbORd8OCESzebjv/Dc2\n" + - "BJJV498N3BfSZYWN+baVxKuOZ4HWXV5NyP85rEvbcaAWcmqvh++G88FOCTQvYd4D\n" + - "/RKgAMptDjM+4X6V2NIRXcmOZJWZ2iItao76FARvbKH0D2UJLG4ENdOznRonnItP\n" + - "74UEVfNCb/i7I+NMJYTuDA4/rr+AS6pttvsVM9pqWkIJqOloEVNcCyyr1buflfJO\n" + - "j4A8Nz9fTUffpfApQnPi394iUcdCVyCrcjB2ta2eMR/3AyhiSXOmxcGjUcECAwEA\n" + - "AaOCAoIwggJ+MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAM\n" + - "BgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSg57WFIkW4b1eTcWX+qZsN+JEewTAfBgNV\n" + - "HSMEGDAWgBS/qVO/G2nYhSk0mmlDy9Z61Jn/bTB4BggrBgEFBQcBAQRsMGowNQYI\n" + - "KwYBBQUHMAGGKWh0dHA6Ly9vY3NwLnBraS5nb29nL3MvZ3RzMmQzL1pEZWExWTdT\n" + - "SlBZMDEGCCsGAQUFBzAChiVodHRwOi8vcGtpLmdvb2cvcmVwby9jZXJ0cy9ndHMy\n" + - "ZDMuZGVyMCYGA1UdEQQfMB2CG3Jldm9rZWQuZ3RzcjMuZGVtby5wa2kuZ29vZzAh\n" + - "BgNVHSAEGjAYMAgGBmeBDAECATAMBgorBgEEAdZ5AgUDMDwGA1UdHwQ1MDMwMaAv\n" + - "oC2GK2h0dHA6Ly9jcmxzLnBraS5nb29nL2d0czJkMy9WREItNVdJSTVRSS5jcmww\n" + - "ggEEBgorBgEEAdZ5AgQCBIH1BIHyAPAAdQDoPtDaPvUGNTLnVyi8iWvJA9PL0RFr\n" + - "7Otp4Xd9bQa9bgAAAYck00MJAAAEAwBGMEQCIALwbMReWy/zrvUwV1G5XOxN8koN\n" + - "VJ1pp7s1d7ClE9ebAiBYWwJeccnfHLIh9AJTdeuN+R/pDzEudVBSC2rIdo3HhgB3\n" + - "ALc++yTfnE26dfI5xbpY9Gxd/ELPep81xJ4dCYEl7bSZAAABhyTTQzMAAAQDAEgw\n" + - "RgIhAOEO0oyiRgMNDdWvRTobr7sex2SUFsjpKmwenYAULrRiAiEA6uKFK1sbnJ1J\n" + - "lW8Tw2G4jGpEFIc4C9duRbU6DIbGnckwCgYIKoZIzj0EAwIDSAAwRQIgN3byD4lu\n" + - "a8A0hzUR1OnPoXSyfus6HOhmBozH6coY9MICIQDsT5jj5GKVtxtlcki5iE08K70Z\n" + - "gt/tkcE1Fkk4RsZORA==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Mar 27 13:47:24 PDT 2023", System.out); - } -} - -class GoogleGTSR4 { - - // Owner: CN=GTS CA 2P2, O=Google Trust Services LLC, C=US - // Issuer: CN=GTS Root R4, O=Google Trust Services LLC, C=US - // Serial number: 2166825e1700440612491f540 - // Valid from: Tue Oct 04 17:00:42 PDT 2022 until: Wed Sep 29 17:00:42 PDT 2027 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDITCCAqagAwIBAgINAhZoJeFwBEBhJJH1QDAKBggqhkjOPQQDAzBHMQswCQYD\n" + - "VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG\n" + - "A1UEAxMLR1RTIFJvb3QgUjQwHhcNMjIxMDA1MDAwMDQyWhcNMjcwOTMwMDAwMDQy\n" + - "WjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz\n" + - "IExMQzETMBEGA1UEAxMKR1RTIENBIDJQMjBZMBMGByqGSM49AgEGCCqGSM49AwEH\n" + - "A0IABKdQkzjAHqOUsb/TkH7cz5lRtD374tNZ8rYrCUb1mxypE+VmCb1Jgzq+93tR\n" + - "dE78GRzPI4+q6raha1TEyWgoniOjggF2MIIBcjAOBgNVHQ8BAf8EBAMCAYYwHQYD\n" + - "VR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAw\n" + - "HQYDVR0OBBYEFIcjqVBIDgeJVApxMPYz0gpH9p2sMB8GA1UdIwQYMBaAFIBM1ut0\n" + - "/0k2o9XY/LU+xWrwlB2MMGgGCCsGAQUFBwEBBFwwWjAmBggrBgEFBQcwAYYaaHR0\n" + - "cDovL29jc3AucGtpLmdvb2cvZ3RzcjQwMAYIKwYBBQUHMAKGJGh0dHA6Ly9wa2ku\n" + - "Z29vZy9yZXBvL2NlcnRzL2d0c3I0LmRlcjA0BgNVHR8ELTArMCmgJ6AlhiNodHRw\n" + - "Oi8vY3JsLnBraS5nb29nL2d0c3I0L2d0c3I0LmNybDBNBgNVHSAERjBEMAgGBmeB\n" + - "DAECATA4BgorBgEEAdZ5AgUDMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vcGtpLmdv\n" + - "b2cvcmVwb3NpdG9yeS8wCgYIKoZIzj0EAwMDaQAwZgIxAMnbIiQb5fsdexUuVGoB\n" + - "MVwsDPGd7VC13Y0OBezt7FqFHDwqm8nnVdV/FkNyXNv9/AIxAN51NGqMcbexMOYK\n" + - "pLC0zXfjNwvqBsZhmzCCQIM6MVyBID0rjjxPu7laIaHqAu6T5Q==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=good.gtsr4.demo.pki.goog - // Issuer: CN=GTS CA 2P2, O=Google Trust Services LLC, C=US - // Serial number: 743c4f78750e30f0d407a19254ba96a - // Valid from: Mon Mar 27 12:40:42 PDT 2023 until: Sun Jun 25 12:40:41 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIEsTCCBFegAwIBAgIQB0PE94dQ4w8NQHoZJUupajAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxMKR1RTIENBIDJQMjAeFw0yMzAzMjcxOTQwNDJaFw0yMzA2MjUxOTQw\n" + - "NDFaMCMxITAfBgNVBAMTGGdvb2QuZ3RzcjQuZGVtby5wa2kuZ29vZzCCASIwDQYJ\n" + - "KoZIhvcNAQEBBQADggEPADCCAQoCggEBAOdkWBg3i5CxzH1dvlBoWHtIUyk78OAA\n" + - "bZdq7pKWB8i8C9Rf089uQ+7jQWOmqCNxU+OXdjumPfk/4MQvvtkmaqKi7HCN1bvQ\n" + - "0CrW7Zhi5jx11QuzEEZVdvXcchzmodp9GSl9t6zK/ItNiIYVisH9dqRWrZ/KZnO+\n" + - "y13dlr5UXAXVvNKx1L4TjhGlam7IEJdrAjkLJk4wXAFhv9HaPNJnjj0306xNm2h+\n" + - "VzldpMPlaXGN9JcGQdMVFpa9f0AI/r7SF7I2EDXaIKFToJ4jQurEGc3oxayiv9wB\n" + - "QapXqSTbPztb5SPGdX1yawDeigNHf10tDqFzCpfI/AwLxagpA2YyyXMCAwEAAaOC\n" + - "An0wggJ5M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E-----"; - - // Owner: CN=revoked.gtsr4.demo.pki.goog - // Issuer: CN=GTS CA 2P2, O=Google Trust Services LLC, C=US - // Serial number: 6b2d650d4bc3bd3f11a595bf05187915 - // Valid from: Mon Mar 27 12:47:43 PDT 2023 until: Sun Jun 25 12:47:42 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIEuDCCBF6gAwIBAgIQay1lDUvDvT8RpZW/BRh5FTAKBggqhkjOPQQDAjBGMQsw\n" + - "CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzET\n" + - "MBEGA1UEAxMKR1RTIENBIDJQMjAeFw0yMzAzMjcxOTQ3NDNaFw0yMzA2MjUxOTQ3\n" + - "NDJaMCYxJDAiBgNVBAMTG3Jldm9rZWQuZ3RzcjQuZGVtby5wa2kuZ29vZzCCASIw\n" + - "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOEKoC1Zv/m2G8DrGkOgLq5TPSeC\n" + - "X3cClcI6s4JS5Cld2DKX7m4P8rXAxJyVHvlmkxZQoD6Y7JxsavlJ/Yw0qdqkNLTv\n" + - "kviEiLNYEn8Qu0SoRLNanzoFUINZkAZ4/0Lfvsrl9tTigLsCJ4jQauemGmGcmKUy\n" + - "qsKisfrMC0ZG9EP9WRjc9WF13Jqe55+gZ7LqaAAoPVR/7J6T1VAKteaYaXrORtVF\n" + - "uMeinE4c9YuxRCLa+3X1qqc3HAsvZEBOdb35fC0cN/ILktCQpq1Fj+QD4jfR6bVQ\n" + - "E8eA6Jy+5qHSg2VjAm6wNLd5QkfE7D8uC9sYs638r48ahcXhy3zwpzGhuH0CAwEA\n" + - "AaOCAoEwggJ9MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAM\n" + - "BgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQl5Uh4jTR3l8PkcLdBwtwQXkUzBjAfBgNV\n" + - "HSMEGDAWgBSHI6lQSA4HiVQKcTD2M9IKR/adrDB4BggrBgEFBQcBAQRsMGowNQYI\n" + - "KwYBBQUHMAGGKWh0dHA6Ly9vY3NwLnBraS5nb29nL3MvZ3RzMnAyL3h5WmtBTEE3\n" + - "aGY0MDEGCCsGAQUFBzAChiVodHRwOi8vcGtpLmdvb2cvcmVwby9jZXJ0cy9ndHMy\n" + - "cDIuZGVyMCYGA1UdEQQfMB2CG3Jldm9rZWQuZ3RzcjQuZGVtby5wa2kuZ29vZzAh\n" + - "BgNVHSAEGjAYMAgGBmeBDAECATAMBgorBgEEAdZ5AgUDMDwGA1UdHwQ1MDMwMaAv\n" + - "oC2GK2h0dHA6Ly9jcmxzLnBraS5nb29nL2d0czJwMi9sU1htaTNxZWRoYy5jcmww\n" + - "ggEDBgorBgEEAdZ5AgQCBIH0BIHxAO8AdgCt9776fP8QyIudPZwePhhqtGcpXc+x\n" + - "DCTKhYY069yCigAAAYck1BYGAAAEAwBHMEUCIGM5ykDTU3mqgLIk+fPmVn6JGUXB\n" + - "W4xouGUA1iiNs7G0AiEAtuWnV/J5llcxB7ZTwkCb6cviyv4Z6O396ZGW8GsrqAQA\n" + - "dQC3Pvsk35xNunXyOcW6WPRsXfxCz3qfNcSeHQmBJe20mQAAAYck1BYIAAAEAwBG\n" + - "MEQCIHcK1H025GIv8klzQGSZAL9NnuH5EzeGra0jRRg5RM4UAiAQaJyJDBkJRL/C\n" + - "F9WCg9Lmp8bdsXkG5WPreI24ansAPTAKBggqhkjOPQQDAgNIADBFAiBehPLU7raP\n" + - "509khaP9yiKiL3mbygtfQo4MDpBnd2RI6wIhAOdlQythGgU+nOENodsB+wUOQXOb\n" + - "akcBOxrDWfyhxmpk\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Mar 27 13:48:18 PDT 2023", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/LetsEncryptCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/LetsEncryptCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/LetsEncryptCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/LetsEncryptCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2017, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* - * @test - * @bug 8189131 - * @summary Interoperability tests with Let's Encrypt CA - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath LetsEncryptCA OCSP - * @run main/othervm -Djava.security.debug=certpath LetsEncryptCA CRL - */ - - /* - * Obtain TLS test artifacts for Let's Encrypt CA from: - * - * Valid TLS Certificates: - * https://valid-isrgrootx1.letsencrypt.org/ - * - * Revoked TLS Certificates: - * https://revoked-isrgrootx1.letsencrypt.org/ - * - * Test artifacts don't have CRLs listed and intermediate cert doesn't have OCSP. - */ -public class LetsEncryptCA { - - // Owner: CN=R3, O=Let's Encrypt, C=US - // Issuer: CN=ISRG Root X1, O=Internet Security Research Group, C=US - // Serial number: 912b084acf0c18a753f6d62e25a75f5a - // Valid from: Thu Sep 03 17:00:00 PDT 2020 until: Mon Sep 15 09:00:00 PDT 2025 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw\n" + - "TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n" + - "cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw\n" + - "WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg\n" + - "RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n" + - "AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP\n" + - "R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx\n" + - "sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm\n" + - "NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg\n" + - "Z3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG\n" + - "/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC\n" + - "AYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB\n" + -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\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=valid-isrgrootx1.letsencrypt.org - // Issuer: CN=R3, O=Let's Encrypt, C=US - // Serial number: 46326744d1c2f3feeca7148ed59353144a6 - // Valid from: Wed Jun 02 08:00:18 PDT 2021 until: Tue Aug 31 08:00:18 PDT 2021 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIFSDCCBDCgAwIBAgISBGMmdE0cLz/uynFI7Vk1MUSmMA0GCSqGSIb3DQEBCwUA\n" + - "MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD\n" + - "EwJSMzAeFw0yMTA2MDIxNTAwMThaFw0yMTA4MzExNTAwMThaMCsxKTAnBgNVBAMT\n" + - "IHZhbGlkLWlzcmdyb290eDEubGV0c2VuY3J5cHQub3JnMIIBIjANBgkqhkiG9w0B\n" + - "AQEFAAOCAQ8AMIIBCgKCAQEAmdx7jlaUZ0MgEvqzYWXItAFxVAOmR3KF+79vU195\n" + - "O5X54Go1+GU+eyFAeTqr6W1gC/MIrSA9LO4neJUx5AWCYaLq7IE7/YnmXTT6BB0x\n" + - "WFN3V1OJg9bAqpcEclQp6fbQS6DjdQvUUaEvVIwPzaen6Hmtw6LuHOYOdLk4fUSm\n" + - "zadWiyNlMm0/ts+MLHY5iQd9ypGhJED7KBDQ4d4wvyMYo/MYKOUQ+dTXcIegh7p4\n" + - "0OVtbrkdCuGJL+cEw1IUtSNQD+MnvUIu1je7Yb6iZ6Qd3iopNLykHYZb8YemakGX\n" + - "SDdC54yi35NU+Y+l23vycbVmRd8vK1sizhjRSE+ufmEqXQIDAQABo4ICXTCCAlkw\n" + - "DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM\n" + - "BgNVHRMBAf8EAjAAMB0GA1UdDgQWBBR300bKVFG2auzS0mO4+E57SN6QLzAfBgNV\n" + - "HSMEGDAWgBQULrMXt1hWy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Ue/ytyv4vLfRR4udi2XxWt3x1la\n" + - "7R3zuWdRQhh21p1H\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked-isrgrootx1.letsencrypt.org - // Issuer: CN=R3, O=Let's Encrypt, C=US - // Serial number: 4f1333011635d76d6356c5f1fb8a7273617 - // Valid from: Fri Jun 25 08:18:10 PDT 2021 until: Thu Sep 23 08:18:09 PDT 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIFSTCCBDGgAwIBAgISBPEzMBFjXXbWNWxfH7inJzYXMA0GCSqGSIb3DQEBCwUA\n" + - "MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD\n" + - "EwJSMzAeFw0yMTA2MjUxNTE4MTBaFw0yMTA5MjMxNTE4MDlaMC0xKzApBgNVBAMT\n" + - "InJldm9rZWQtaXNyZ3Jvb3R4MS5sZXRzZW5jcnlwdC5vcmcwggEiMA0GCSqGSIb3\n" + - "DQEBAQUAA4IBDwAwggEKAoIBAQCkCp4fq7FnN5lfAWX0vhCcyC5WO9TuU6ckuYYj\n" + - "8/wQ8GQ/FIl+vXCAmHIfIX14irQN8TISeVdMOP0C7sa73d3GSawX7qMaRhddXn7V\n" + - "EL+4CbHQ6qit5YkakwhHz9tKbYX16wPj+inn22kJVwi8iLbhYB9WWSvv7OyiNSHv\n" + - "nmlYUkMv8+9UhgPT4yCKF1OEI5ajUOuecjOKc+EzsT/JqPRErvBOIKn3PRn4h8UM\n" + - "0BJDrDtZMpkvD4/lyRs3g/BLsf3DQjlEgKit0hvc72yyhiDbKd41EmBoQC5rNF7o\n" + - "B0CnBXhDLHbC/YRunVrYGsF0h2J9hw4055BdaXbS2BJnPEFnAgMBAAGjggJcMIIC\n" + - "WDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC\n" + - "MAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFJ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zT8iBDEH7nG\n" + - "MsqWuwB5TN5vIuw2aWxcfaqKayq7UPA4rJePWdD/5RzKlQKLQx0BA3AL+3Nnj1fT\n" + - "NEKwCWWylIND6z/9Xw==\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - pathValidator.enableCRLCheck(); - - // Validate int, EE certs don't have CRLs - pathValidator.validate(new String[]{INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - return; - } - - // OCSP check by default - // intermediate cert R3 doesn't specify OCSP responder - ValidatePathWithParams pathValidator = new ValidatePathWithParams(new String[]{INT}); - pathValidator.enableOCSPCheck(); - - // Validate valid - pathValidator.validate(new String[]{VALID}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED}, - ValidatePathWithParams.Status.REVOKED, - "Fri Jun 25 09:18:12 PDT 2021", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/MicrosoftTLS.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/MicrosoftTLS.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/MicrosoftTLS.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/MicrosoftTLS.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,348 +0,0 @@ -/* - * Copyright (c) 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8304760 - * @summary Interoperability tests with Microsoft TLS root CAs - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath MicrosoftTLS OCSP - * @run main/othervm -Djava.security.debug=certpath MicrosoftTLS CRL - */ - -/* - * Microsoft ECC Root Certificate Authority 2017: - * Valid: http://acteccroot2017.pki.microsoft.com/ - * Revoked: http://rvkeccroot2017.pki.microsoft.com/ - * Expired: http://expeccroot2017.pki.microsoft.com/ - * - * Microsoft RSA Root Certificate Authority 2017: - * Valid: http://actrsaroot2017.pki.microsoft.com/ - * Revoked: http://rvkrsaroot2017.pki.microsoft.com/ - * Expired: http://exprsaroot2017.pki.microsoft.com/ - */ -public class MicrosoftTLS { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new MicrosoftECCTLS().runTest(pathValidator); - new MicrosoftRSATLS().runTest(pathValidator); - } -} - -class MicrosoftECCTLS { - - // Owner: CN=Microsoft ECC TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Issuer: CN=Microsoft ECC Root Certificate Authority 2017, O=Microsoft - // Corporation, C=US - // Serial number: 33000000282bfd23e7d1add707000000000028 - // Valid from: Thu Jun 24 12:58:36 PDT 2021 until: Wed Jun 24 12:58:36 PDT 2026 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIESTCCA8+gAwIBAgITMwAAACgr/SPn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c29mdC5jb20vcGtpb3BzL2NlcnRzL01pY3Jv\n" + - "c29mdCUyMEVDQyUyMFJvb3QlMjBDZXJ0aWZpY2F0ZSUyMEF1dGhvcml0eSUyMDIw\n" + - "MTcuY3J0MC0GCCsGAQUFBzABhiFodHRwOi8vb25lb2NzcC5taWNyb3NvZnQuY29t\n" + - "L29jc3AwcAYDVR0gBGkwZzAIBgZngQwBAgEwCAYGZ4EMAQICMFEGDCsGAQQBgjdM\n" + - "g30BATBBMD8GCCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtp\n" + - "b3BzL0RvY3MvUmVwb3NpdG9yeS5odG0wCgYIKoZIzj0EAwMDaAAwZQIxANmPydUj\n" + - "lgj/2K77UnMeMkSGIgXzOhcTsixzZL+NmTR1Bq2hSPeA6Y3mn3lMlwxZmAIwIio6\n" + - "KrgItH4YmLWKd8QClIrE9QjbDlR7oFqaU3J34bWbMlAEjRARdZhhQlNwdORe\n" + - "-----END CERTIFICATE-----"; - - // Owner: O=Microsoft Corporation, L=Redmond, ST=Washington, C=US - // Issuer: CN=Microsoft ECC TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Serial number: 3300000154e1c6007ee3d5c903000000000154 - // Valid from: Fri Oct 14 13:44:52 PDT 2022 until: Mon Oct 09 13:44:52 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIF3zCCBWSgAwIBAgITMwAAAVThxgB+49XJAwAAAAABVDAKBggqhkjOPQQDAzBb\n" + - "MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSww\n" + - "KgYDVQQDEyNNaWNyb3NvZnQgRUNDIFRMUyBJc3N1aW5nIEFPQyBDQSAwMTAeFw0y\n" + - "MjEwMTQyMDQ0NTJaFw0yMzEwMDkyMDQ0NTJaMFQxCzAJBgNVBAYTAlVTMRMwEQYD\n" + - "VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy\n" + - "b3NvZnQgQ29ycG9yYXRpb24wdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARk86yqvyiv\n" + - "jH2Frg2l6bmh1f0CqiKAEHdA2S2vTQhR4CtvFArkrPdqcKrhAAfQSgnC8KJQ08gl\n" + - "QvjK55202ib55YX3h+96IW6fQOkE18cvPwqkD3DVQuROouLaL1r70NWjggPvMIID\n" + - "6zCCAX8GCisGAQQB1nkCBAIEggFvBIIBawFpAHYA6D7Q2j71BjUy51covIlryQPT\n" + - "y9ERa+zraeF3fW0GvW4AAAGD2EdUigAABAMARzBFAiEA6rbt+9QhpuqX36PnuckO\n" + - "fR0Wu/8z3Yry9fdFKvJDCEUCIGBz901b4ZGEjCaSJdlZVr29v2td4crPa9I6S97i\n" + - "nShAAHYAs3N3B+GEUPhjhtYFqdwRCUp5LbFnDAuH3PADDnk2pZoAAAGD2EdU/wAA\n" + - "BAMARzBFAiBIvnSKGeCIWOlZowi7s7ZdwmyGhv2waJWSdewUSS6UOAIhALJhPQ19\n" + - "nmjjTwWB9sgCIF7RZbd2xwBd1hno06MQMSqTAHcAejKMVNi3LbYg6jjgUh7phBZw\n" + - "MhOFTTvSK8E6V6NS61IAAAGD2EdUxwAABAMASDBGAiEArrc6Fu74KTj/z4lGCK9A\n" + - "O6UkhLpKnXdxEHilY7ghcZICIQCUjkvK4wehX1qEonjQoBkBJxLCus6y8WbkoxCe\n" + - "jHu2HTAbBgkrBgEEAYI3FQoEDjAMMAoGCCsGAQUFBwMBMDwGCSsGAQQBgjcVBwQv\n" + - "MC0GJSsGAQQBgjcVCIe91xuB5+tGgoGdLo7QDIfw2h1dgbXdUIWf/XUCAWQCAR0w\n" + - "gaYGCCsGAQUFBwEBBIGZMIGWMGUGCCsGAQUFBzAChllodHRwOi8vd3d3Lm1pY3Jv\n" + - "c29mdC5jb20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMEVDQyUyMFRMUyUyMElz\n" + - "c3VpbmclMjBBT0MlMjBDQSUyMDAxLmNydDAtBggrBgEFBQcwAYYhaHR0cDovL29u\n" + - "ZW9jc3AubWljcm9zb2Z0LmNvbS9vY3NwMB0GA1UdDgQWBBTVpTA+3jWCa1okX5Ri\n" + - "HnuY2/b+IzAOBgNVHQ8BAf8EBAMCB4AwKwYDVR0RBCQwIoIgYWN0ZWNjcm9vdDIw\n" + - "MTcucGtpLm1pY3Jvc29mdC5jb20waAYDVR0fBGEwXzBdoFugWYZXaHR0cDovL3d3\n" + - "dy5taWNyb3NvZnQuY29tL3BraW9wcy9jcmwvTWljcm9zb2Z0JTIwRUNDJTIwVExT\n" + - "JTIwSXNzdWluZyUyMEFPQyUyMENBJTIwMDEuY3JsMGYGA1UdIARfMF0wUQYMKwYB\n" + - "BAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWljcm9zb2Z0LmNv\n" + - "bS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTAIBgZngQwBAgIwHwYDVR0jBBgw\n" + - "FoAUMVu5zlEbfNGqA8Dr7TZdwp3TieEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCgYI\n" + - "KoZIzj0EAwMDaQAwZgIxAOKV8s3SpXVd6zho8zQa4uGXkxPVocYo410FdTwu0lw7\n" + - "G/MQPhLmj4DNsQJ/nYzDcwIxAMw7iZExsY9Is66/EaAty4rA+yuliwCag88VnDRH\n" + - "9cjiongZgpddIYS8xf76B2pi/Q==\n" + - "-----END CERTIFICATE-----"; - - // Owner: O=Microsoft Corporation, L=Redmond, ST=Washington, C=US - // Issuer: CN=Microsoft ECC TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Serial number: 3300000155ea28117be8708034000000000155 - // Valid from: Fri Oct 14 13:50:39 PDT 2022 until: Mon Oct 09 13:50:39 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIF3TCCBWOgAwIBAgITMwAAAVXqKBF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gCZ/soGnLsgPIscuNH/BK20=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Fri Oct 14 15:46:18 PDT 2022", System.out); - } -} - -class MicrosoftRSATLS { - - // Owner: CN=Microsoft RSA TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Issuer: CN=Microsoft RSA Root Certificate Authority 2017, O=Microsoft - // Corporation, C=US - // Serial number: 330000002ffaf06f6697e2469c00000000002f - // Valid from: Thu Jun 24 13:57:35 PDT 2021 until: Wed Jun 24 13:57:35 PDT 2026 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIHmDCCBYCgAwIBAgITMwAAAC/68G9ml+JGnAAAAAAALzANBgkqhkiG9w0BAQwF\n" + - "ADBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u\n" + - "MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9y\n" + - "aXR5IDIwMTcwHhcNMjEwNjI0MjA1NzM1WhcNMjYwNjI0MjA1NzM1WjBbMQswCQYD\n" + - "VQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSwwKgYDVQQD\n" + - "EyNNaWNyb3NvZnQgUlNBIFRMUyBJc3N1aW5nIEFPQyBDQSAwMTCCAiIwDQYJKoZI\n" + - "hvcNAQEBBQADggIPADCCAgoCggIBAKAYz8zB6I+LeiWYURf1QUaISydvRgxWfcc6\n" + - "UvEiwvryj2UsRfFuREo2ErLTvP9qQ9E0YBTyWEqI2TXn4jo2uZ2cpGODiQQWlixe\n" + - "aAFcYgSqLzidFXj401vzQsz4E0zylD/ZeY+xkQ6xrdg5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- "lFWb683Do3Ls59MMCxhy6Erb7kFQgu1oUWXGFhbMQkeLN4TXGi6X3loXYfING9om\n" + - "nWa/udxvPRwAZmcHU2l2W8cwVXiy6uucsh3kPQ==\n" + - "-----END CERTIFICATE-----"; - - // Owner: O=Microsoft Corporation, L=Redmond, ST=Washington, C=US - // Issuer: CN=Microsoft RSA TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Serial number: 330000014a3b44c12636e54b9f00000000014a - // Valid from: Fri Oct 14 13:55:34 PDT 2022 until: Mon Oct 09 13:55:34 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIILDCCBhSgAwIBAgITMwAAAUo7RMEmNuVLnwAAAAABSjANBgkqhkiG9w0BAQwF\n" + - "ADBbMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u\n" + - "MSwwKgYDVQQDEyNNaWNyb3NvZnQgUlNBIFRMUyBJc3N1aW5nIEFPQyBDQSAwMTAe\n" + - "Fw0yMjEwMTQyMDU1MzRaFw0yMzEwMDkyMDU1MzRaMFQxCzAJBgNVBAYTAlVTMRMw\n" + - "EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN\n" + - "aWNyb3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n" + - "AoIBAQDTo/3ysrrKP2eOLQ8JUFhQT09HJM1lUr0nH7RiP4VAKFrGFMIQSCsq17y7\n" + - "PuTHxW53Fvxb5s/EKZobzhlgv4rHQxvoMuGWRBgJN6KfspQAuFnUVG+3y70fHy/O\n" + - "PiVUJdfTupsys/fjzERqzx6FZoU1RzQ08na36SicSOQmj5svtHHxL8ZibDD48Xzp\n" + - "oIEBh2uUDhevkZedBmqlIdAhNgKXqf2lieLjWXZQLzUyXHikQJxNFOHFVjBqH3pu\n" + - "pYt2XD78bS/xeKRbGLw52+o3/u4ea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aCBmmbI\n" + - "ougVo16GCOdcOG9+c6dBjbHseaQY0a95ZirtNLbutIvmvMIysvAHMC3NkunnD0cQ\n" + - "BxF47+meDc80QJGCaNlJ8E1SlUbEtRfVNsbcw1skO3hAsYAIA8M//BW7XcKRDvLn\n" + - "nPrC+5fWtDzmXgUE/Sve3rCr/AfBiBrLERcJHxYy41U=\n" + - "-----END CERTIFICATE-----"; - - // Owner: O=Microsoft Corporation, L=Redmond, ST=Washington, C=US - // Issuer: CN=Microsoft RSA TLS Issuing AOC CA 01, O=Microsoft Corporation, C=US - // Serial number: 330000014b4c2b0b9955688feb00000000014b - // Valid from: Fri Oct 14 13:56:58 PDT 2022 until: Mon Oct 09 13:56:58 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIIKjCCBhKgAwIBAgITMwAAAUtMKwuZVWiP6wAAAAABSzANBgkqhkiG9w0BAQwF\n" + - "ADBbMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u\n" + - "MSwwKgYDVQQDEyNNaWNyb3NvZnQgUlNBIFRMUyBJc3N1aW5nIEFPQyBDQSAwMTAe\n" + - "Fw0yMjEwMTQyMDU2NThaFw0yMzEwMDkyMDU2NThaMFQxCzAJBgNVBAYTAlVTMRMw\n" + - "EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN\n" + - "aWNyb3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n" + - "AoIBAQD2UxPzrv61IqG8jCFPWM3KeQpBeBlxh3mzvWVFmo340r0J1C3uLaUTPYLo\n" + - "P+Xndq2GqYLlm/5FEY7ynU1as57SH0tHbKCIYYJezn/ZJHUYcOY80uGKpP3bdbRq\n" + - "W51Xo7/gzTrXFJ2Nrn05d9mKBq+Oxs71+Nj7QuzjHYAF0n8OWNwZCBOBdAX3EDVQ\n" + - "4HB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qFFQHcONBl\n" + - "ApIjebH4RlOGiRRRJ5/Wz9Wk850mEvF16UlB1MUpLiKU63/nJvuR1TvOisAUl+5L\n" + - "oAfBFVkX4IGJU+9tc4VXYvTpd24xLHk/o6Fnl23D6zWlsZKldNxYPhiriXN9Duvb\n" + - "6xmaQX4gua6jmTFUhKDyyVJpW1A4GjuenPYsCmabzydiAeMIQirCCLSTqXrSw1YL\n" + - "2+608l1nqYy1JOrSq/zFp3c5buSFbjj7jVJB5LEh\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Fri Oct 14 15:46:18 PDT 2022", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,495 +0,0 @@ -/* - * Copyright (c) 2017, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8189131 8207059 - * @key intermittent - * @summary Interoperability tests with QuoVadis Root CA1, CA2, and CA3 G3 CAs - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath QuoVadisCA OCSP - * @run main/othervm -Djava.security.debug=certpath QuoVadisCA CRL - */ - -/* - * Obtain TLS test artifacts for QuoVadis CAs from: - * - * https://www.quovadisglobal.com/download-roots-crl/ - * - */ -public class QuoVadisCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - new RootCA1G3().runTest(pathValidator); - new RootCA2G3().runTest(pathValidator); - new RootCA3G3().runTest(pathValidator); - } -} - -class RootCA1G3 { - - // Owner: CN=DigiCert QuoVadis TLS ICA QV Root CA 1 G3, O="DigiCert, Inc", C=US - // Issuer: CN=QuoVadis Root CA 1 G3, O=QuoVadis Limited, C=BM - // Serial number: 2837d5c3c2b57294becf99afe8bbdcd1bb0b20f1 - // Valid from: Wed Jan 06 12:50:51 PST 2021 until: Sat Jan 04 12:50:51 PST 2031 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFgDCCA2igAwIBAgIUKDfVw8K1cpS+z5mv6Lvc0bsLIPEwDQYJKoZIhvcNAQEL\n" + - "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" + - "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0yMTAxMDYyMDUwNTFaFw0z\n" + - "MTAxMDQyMDUwNTFa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0BAQsFAAOCAgEAb6tTptzzi4ssb+jA\n" + - "n2O2vAjAo7ydlfN9v+QH0ZuGHlUc9bm8dpNpBo9yt6fWHIprGLJjVOF7HwVDQcJD\n" + - "DhX4638Q7ETDrbTVQ4/edX6Yesq6C1G8Pza1LwStXD/jCQHFvWbPud86V0ikS4rS\n" + - "qlmu3fzUrGZ2/Q+n5jrnRqM5IS8TXYcnzLD3azH1+aZjkwQt9HP4IuvAe/Bg9aWE\n" + - "XeDmksbg0SqQInrWn+BVYtD+hCZNz8K0GnKKpx3Q9VxzRv+BMbO5e9iqK1Hcj5Wv\n" + - "ZXvU45j2r5y9WML4fc8CvphzbF6ezr1e51i+yabNmfld33gRX48V5oNk16wX32ed\n" + - "kQ83sKNomQm1dXURWK8aSDcZFAvJQ8vKTLIE9wiQmtjfSGoJzQhKLaN+egrp4L9y\n" + - "fjpFIeK4zgAH39P4s4kaPWTdfXe2n6P5o7Xolp4R22SVkI76d8d+5Iv7Rtqd+mqI\n" + - "y1hkwyTBbOBLtyF7yMtJQewkkZ0MWxkPvWg193RbYVRx8w1EycnxMgNwy2sJw7MR\n" + - "XM6Mihkw910BkvlbsFUXw4uSvRkkRWSBWVrkM5hvZGtbIJkqrdnj55RSk4DLOOT/\n" + - "LUyji/KpgD7YCi7emFA4tH6OpkNrjUJ3gdRnD4GwQj/87tYeoQWZ6uCl0MHDUCmw\n" + - "73bpxSkjPrYbmKo9mGEAMhW1ZxY=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-1-g3.chain-demos.digicert.com, O="DigiCert, Inc.", - // L=Lehi, ST=Utah, C=US - // Issuer: CN=DigiCert QuoVadis TLS ICA QV Root CA 1 G3, O="DigiCert, Inc", C=US - // Serial number: a94cc08600f5fe5d3f0659bfcfec6f0 - // Valid from: Fri Mar 04 16:00:00 PST 2022 until: Wed Apr 05 16:59:59 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIG/DCCBeSgAwIBAgIQ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lrCKO9GsaYCIQCKimXl\n" + - "j4LjJ4BlG9H1J+V747tuf7ONnAzkCPsa2ymOuzANBgkqhkiG9w0BAQsFAAOCAQEA\n" + - "b9havJS9egan+4dgMhI6gDt6rjdWRniyi7kXv7/vWJXOxR1xl2d/WYDLsfp3BbqW\n" + - "YuKQwB5tTH1hEoNhQIyGnuE1Y1ZgtX24rSVfTCkU/3dnTZaIhaZgFHyftAum7xSI\n" + - "Qzu7pwih+PXrGNXupsnZ+VUE7a7zHyRDajixhSp7dZS4zLoDTxeyKX0MDmo4e8Mi\n" + - "HNYVASYcrdld90jVJaeI/V3EkJAX7/Eyo9JqzivEwGM0e0JhCLekcVSzhjGoAlbQ\n" + - "tIzCIaeVUlWKKiNXSKr1WD4oCD3ky4Y5VekTGzyUf/0LYzV+Y7p8epc5vTWKwYx/\n" + - "vQwJ4RsgFit+c84mSg4qug==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-1-g3-revoked.chain-demos.digicert.com, - // O="DigiCert, Inc.", L=Lehi, ST=Utah, C=US - // Issuer: CN=DigiCert QuoVadis TLS ICA QV Root CA 1 G3, O="DigiCert, Inc", C=US - // Serial number: e7eff4cdd14ebed1daa7bb7e07300ed - // Valid from: Fri Mar 04 16:00:00 PST 2022 until: Wed Apr 05 16:59:59 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHDjCCBfagAwIBAgIQDn7/TN0U6+0dqnu34HMA7TANBgkqhkiG9w0BAQsFADBZ\n" + - "MQswCQYDVQQGEwJVUzEWMBQGA1UECgwNRGlnaUNlcnQsIEluYzEyMDAGA1UEAwwp\n" + - "RGlnaUNlcnQgUXVvVmFkaXMgVExTIElDQSBRViBSb290IENBIDEgRzMwHhcNMjIw\n" + - "MzA1MDAwMDAwWhcNMjMwNDA1MjM1OTU5WjCBhTELMAkGA1UEBhMCVVMxDTALBgNV\n" + - "BAgTBFV0YWgxDTALBgNVBAcTBExlaGkxFzAVBgNVB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nMAOKV1NOyQ/q8bZ+jehcRZB\n" + - "wUKrCWAzvOw4DPytrDcQmflvQN+Bw92T3uDuoYT/oBcobpVfKpfuW/+ZxxXTIp4L\n" + - "sixlx82SZNTo6e3LOqsgZnR6TFyRJ63sK65M+W0d55bHvleUAHRCOiGhhgqE/cby\n" + - "z50hDzJMLnjskMSpkxMoeSeutAS2e7oIvA//7C37LrQccQ==\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) - throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 08 11:22:28 PST 2022", System.out); - } -} - -class RootCA2G3 { - - // Owner: CN=DigiCert QV EV TLS ICA G1, O="DigiCert, Inc.", C=US - // Issuer: CN=QuoVadis Root CA 2 G3, O=QuoVadis Limited, C=BM - // Serial number: 65e9bcd53e791df22dffeb5ecc2bc7a5588d0883 - // Valid from: Mon Mar 16 12:39:42 PDT 2020 until: Thu Mar 14 12:39:42 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFbzCCA1egAwIBAgIUZem81T55HfIt/+tezCvHpViNCIMwDQYJKoZIhvcNAQEL\n" + - "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" + - "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0yMDAzMTYxOTM5NDJaFw0z\n" + - "MDAzMTQxOTM5NDJaMEoxCzAJBgNVBAYTAlVTMRcwFQYDVQQKDA5EaWdpQ2VydCwg\n" + - "SW5jLjEiMCAGA1UEAwwZRGlnaUNlcnQgUVYgRVYgVExTIElDQSBHMTCCASIwDQYJ\n" + - "KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhwn6I+pGrJsnisnzP7EU5cFN9UT5XF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+u/l413J8C4utKi4ZOQeCJDqvlSDzRsOi+tHsXrCJxnMWN\n" + - "2QBgMGgdPW37zwf0EffoH0Gee3pTgg7I5SzmvBq0t5xRDfv4N0OdM/sN1mc5f3o7\n" + - "0YCd9WXhyDCV5W2O8QIbrd42CK5k1rlM6gXwOyDmYY5CVAl1QeXEeRfDk/zNjU/1\n" + - "+LnH/Dv88VcZhODYq+VGbyM8bpNr0v95PY3yaH4kzpWGqWAN5i9LosfcaqRPmyL4\n" + - "PcKTQwcA9AVTjITExFua/QtGrXLPvMVxR248G9IQpJMxP3JEGkjlKCenmc29r2u1\n" + - "KE4TeCs2xxjR1PusTfX91bBW3YAoAPDTRQKZjolegLUY44j3uKSzAdhMEbZQhovH\n" + - "Lraqx1WjTayTuq1Vuakcia5shmgFVSNcE+NVgLEIe32oTOm/G6Kd1lcm9C4Ph1Cg\n" + - "nfDuqohZrk76kJTk8poAY5aFCQHhVzbpSw3zooMGjjvWnkG+/DC6SZM8rKoOdKiB\n" + - "cy+N\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-2-g3.chain-demos.digicert.com, O="DigiCert, - // Inc.", L=Lehi, ST=Utah, C=US, SERIALNUMBER=5299537-0142, OID.1.3.6.1.4 - // 1.311.60.2.1.2=Utah, OID.1.3.6.1.4.1.311.60.2.1.3=US, - // OID.2.5.4 .15=Private Organization - // Issuer: CN=DigiCert QV EV TLS ICA G1, O="DigiCert, Inc.", C=US - // Serial number: 9c5e9d5f169d3a59e64db208d3e849d - // Valid from: Wed Feb 02 16:00:00 PST 2022 until: Mon Mar 06 15:59:59 PST 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHNDCCBhygAwIBAgIQCcXp1fFp06WeZNsgjT6EnTANBgkqhkiG9w0BAQsFADBK\n" + - "MQswCQYDVQQGEwJVUzEXMBUGA1UECgwORGlnaUNlcnQsIEluYy4xIjAgBgNVBAMM\n" + - "GURpZ2lDZXJ0IFFWIEVWIFRMUyB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0PtjC4IaIFTKYKMA0GCSqGSIb3DQEB\n" + - "CwUAA4IBAQC5KLlms/+5XcCIEFBpQSwT7VoRcqnrVWlhya+9ClA98LYuDUeHcHt6\n" + - "lHvfjEEmy2s2GoKHK/JxXzftBau5LbDWlvQ6EF+22fnaVDsKIwNgYwbhJb+6zr8t\n" + - "LOFS6Y51YSlRrDUvy94S3PE7N8D3wyKq18IhXOI1WUeR0bKHLlXtl+ZjKMIMkd/l\n" + - "YtLnnskRCQa0P/HLwQYLUpgiNGVZJQbjrWsVzcw12mR/gza1KjR02STJRGZad7L0\n" + - "Oz48CRhm94iaEjFcVKT3vcDUrtCKpkmhBACcdA3NNqDq10i/SLspOeDLSESkkJKF\n" + - "w8w3YCqXjZn5JyV3sVHYNezNKtLdCxn4\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-2-g3-revoked.chain-demos.digicert.com, - // O="DigiCert, Inc.", L=Lehi, ST=Utah, C=US, SERIALNUMBER=5299537-0142, - // OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.2=Utah, - // OID.1.3.6.1.4.1.311.60.2.1.3=US - // Issuer: CN=DigiCert QV EV TLS ICA G1, O="DigiCert, Inc.", C=US - // Serial number: 3f84605850df3ac98fcc15adec269f8 - // Valid from: Sun Apr 17 17:00:00 PDT 2022 until: Fri May 19 16:59:59 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHQDCCBiigAwIBAgIQA/hGBYUN86yY/MFa3sJp+DANBgkqhkiG9w0BAQsFADBK\n" + - "MQswCQYDVQQGEwJVUzEXMBUGA1UECgwORGlnaUNlcnQsIEluYy4xIjAgBgNVBAMM\n" + - "GURpZ2lDZXJ0IFFWIEVWIFRMUyBJQ0EgRzEwHhcNMjIwNDE4MDAwMDAwWhcNMjMw\n" + - "NTE5MjM1OTU5WjCB5zETMBEGCysGAQQBgjc8AgEDEwJVUzEVMBMGCysGAQQBgjc8\n" + - "AgECEwRV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wzmp408jfUDohl5evV\n" + - "oZrum3P3zgLRz1qswFM5a2HteWzCWWi/n6d6nKXj6PGGVAMQfk1s6PaWhYBuiaag\n" + - "myYss/LTPzaLGUfFzlt/HfomiD+BNuBOVa+pPrmTWhex+e02z95n6RPYCiazuZNZ\n" + - "xiarN83pRNu/fIjVXw2jENg7+kaC1wwLqET0x6/EJa6YI3Xa7Aumb8Pp2r2UZ5Tr\n" + - "7BUhmiRLkvw/9SI8ceXNSwuTTGK2fKHm2/CWqI0cS3zWk3dC\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) - throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Apr 18 14:07:46 PDT 2022", System.out); - } -} - -class RootCA3G3 { - - // Owner: CN=DigiCert QuoVadis TLS ICA QV Root CA 3 G3, O="DigiCert, Inc", C=US - // Issuer: CN=QuoVadis Root CA 3 G3, O=QuoVadis Limited, C=BM - // Serial number: 427dd33a8ff51d8152e813c7dec93ba76312a7d8 - // Valid from: Wed Jan 06 12:55:40 PST 2021 until: Sat Jan 04 12:55:40 PST 2031 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIFgDCCA2igAwIBAgIUQn3TOo/1HYFS6BPH3sk7p2MSp9gwDQYJKoZIhvcNAQEL\n" + - "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" + - "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMyBHMzAeFw0yMTAxMDYyMDU1NDBaFw0z\n" + - "MTAxMDQyMDU1NDBaMFkxCzAJBgNVBAYTAlVTMRYwFAYDVQQKDA1EaWdpQ2VydCwg\n" + - "SW5jMTIwMAYDVQQDDClEaWdpQ2VydCBRdW9WYWRpcyBUTFMgSUNBI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\n" + - "OYOtVedx6VGDu6IuSKTVgPPhzwKP5ZA7wtmgKR8+W4E3DM1VerA9Po9ycDK9qCdl\n" + - "K4tuF37grKEzlQKovG+kn0z+Zi0D/E1kN1Q8YmX35HHRenJWKEnAL9QROh0X9jFi\n" + - "SlsHPrxWC3adOdAW+B+kVG0cM2nurd0Ic2YkiLKOOaSd5hbCQY/fCZwohtest+ZU\n" + - "Ajyd+FVzSNvEFrwPzZwKfcdemvD4kew8lx5sG6BUL4GkFWnotxSr+F9Huwgj4pC+\n" + - "cxE2841a/9r/gliuwDM/8jkt16epFAdw0fXemyM8FdHJDnB++3d8SyjOOQ8j+VHW\n" + - "31NWx27sORa5CgRchlldXWDzIIEwbc82a1OAfGUmNAsdEHjMl1HMcZHbjCmdSdsw\n" + - "fmyldZrj2YmvOI5ZlE9z4vzi35KyqlxWCtu9O/SJq/rBvYS0TPmm8HbhJQbeMe6p\n" + - "vJGrxcb1muSBANn9T9wvukjiNNw32ciSDCjZ0h4N+CGxbzoZtgIAQ29IunYdnJix\n" + - "ZiP+ED6xvwgVRBkDSgWD2W/hex/+z4fNmGQJDcri51/tZCqHHv2Y7XReuf4Fk+nP\n" + - "l8Sd/Kpqwde/sJkoqwDcBSJygh0=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-3-g3.chain-demos.digicert.com, O="DigiCert, Inc.", - // L=Lehi, ST=Utah, C=US - // Issuer: CN=DigiCert QuoVadis TLS ICA QV Root CA 3 G3, O="DigiCert, Inc", C=US - // Serial number: f27ee3fad1d754ae78d7866da0a4f6f - // Valid from: Fri Mar 04 16:00:00 PST 2022 until: Wed Apr 05 16:59:59 PDT 2023 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIG/jCCBeagAwIBAgIQDyfuP60ddUrnjXhm2gpPbzANBgkqhkiG9w0BAQsFADBZ\n" + - "MQswCQYDVQQGEwJVUzEWMBQGA1UECgwNRGlnaUNlcnQsIEluYzEyMDAGA1UEAwwp\n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V0q8uMp/nBIyFaW/HNOJUf8j1keaf31WWBAFfUQVY\n" + - "pzFRUnRmNTtGxCvzyY1YhoQSwswGghz8ZCSQPWCST/Tl8kKuVFas8wSUXaEV23t4\n" + - "G0pfIlXL2oIuJwREjzv54SK7xsQ4whco0nw8DvLt+/5us4t96u8r1EuBKkF45ngz\n" + - "t77MTqpa0nvWUT7q9POT7xwQNui7P0j5t7prVX/fBKm5EfK1Jdi1Toj9+VxTIWYk\n" + - "splUCXw7zxaA3nlrncAmnHxZEY8sQjpGY1OGY0udd+m5bldJNbRTA1Q+VoPVMiU6\n" + - "osdBQGUbbWrqm1fnoFW1VvUt\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=quovadis-root-ca-3-g3-revoked.chain-demos.digicert.com, - // O="DigiCert, Inc.", L=Lehi, ST=Utah, C=US - // Issuer: CN=DigiCert QuoVadis TLS ICA QV Root CA 3 G3, O="DigiCert, Inc", C=US - // Serial number: aafa7cafda91796626f5fc8bcb38702 - // Valid from: Fri Mar 04 16:00:00 PST 2022 until: Wed Apr 05 16:59:59 PDT 2023 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHDTCCBfWgAwIBAgIQCq+nyv2pF5Zib1/IvLOHAjANBgkqhkiG9w0BAQsFADBZ\n" + - "MQswCQYDVQQGEwJVUzEWMBQGA1UECgwNRGlnaUNlcnQsIEluYzEyMDAGA1UEAwwp\n" + - "RGlnaUNlcnQgUXVvVmFkaXMgVExTIElDQSBRViBSb290IENBIDMgRzMwHhcNMjIw\n" + - "MzA1MDAwMDAwWhcNMjMwNDA1MjM1OTU5WjCBhTELMAkGA1UEBhMCVVMxDTALBgNV\n" + - "BAgTBFV0YWgxDTALBgNVBAcTBExlaGkxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMu\n" + - "MT8wPQYDVQQDEzZxdW92YWRpcy1yb290LWNhLTMtZzMtcmV2b2tlZC5jaGFpbi1k\n" + - "ZW1vcy5kaWdpY2VydC5jb20wgg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nEneoce0G1InysM/geY1BZ57G9RAUZkzWVTJRLJgbg\n" + - "2nWSqpQJ765gg9JdsRo+zqj1kUBbUYoTSlaAJG6ucrlB\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator) - throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Tue Mar 08 11:23:06 PST 2022", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/SSLCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/SSLCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/SSLCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/SSLCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,489 +0,0 @@ -/* - * Copyright (c) 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8243320 - * @summary Interoperability tests with SSL.com's RSA, EV RSA, and ECC CA - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath SSLCA OCSP - * @run main/othervm -Djava.security.debug=certpath SSLCA CRL - */ - -/* - * Obtain TLS test artifacts for SSL.com CAs from: - * - * SSL.com RSA CA - * Valid - https://test-dv-rsa.ssl.com - * Revoked - https://revoked-rsa-dv.ssl.com/ - * SSL.com EV RSA CA - * Valid - https://test-ev-rsa.ssl.com - * Revoked - https://revoked-rsa-ev.ssl.com/ - * SSL.com ECC CA - * Valid - https://test-dv-ecc.ssl.com - * Revoked - https://revoked-ecc-dv.ssl.com/ - */ -public class SSLCA { - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - boolean ocspEnabled = false; - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - ocspEnabled = true; - } - - new SSLCA_RSA().runTest(pathValidator, ocspEnabled); - new SSLCA_EV_RSA().runTest(pathValidator, ocspEnabled); - new SSLCA_ECC().runTest(pathValidator, ocspEnabled); - } -} - -class SSLCA_RSA { - - // Owner: CN=SSL.com RSA SSL subCA, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Issuer: CN=SSL.com Root Certification Authority RSA, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Serial number: 997ed109d1f07fc - // Valid from: Fri Feb 12 10:48:52 PST 2016 until: Wed Feb 12 10:48:52 PST 2031 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIGbzCCBFegAwIBAgIICZftEJ0fB/wwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UE\n" + - "BhMCVVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQK\n" + - "DA9TU0wgQ29ycG9yYXRpb24xMTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZp\n" + - "Y2F0aW9uIEF1dGhvcml0eSBSU0Ew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l7ofCKlWs\n" + - "y702dmPTKEdEfwhgLx0LxJr/Aw==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=test-dv-rsa.ssl.com - // Issuer: CN=SSL.com RSA SSL subCA, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Serial number: 4ceada4ade82a6ccd0b2ae32c0dbfd62 - // Valid from: Fri Jun 28 07:06:50 PDT 2019 until: Sun Jun 27 07:06:50 PDT 2021 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHTjCCBTagAwIBAgIQTOraSt6CpszQsq4ywNv9YjANBgkqhkiG9w0BAQsFADBp\n" + - "MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24x\n" + - "GDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjEeMBwGA1UEAwwVU1NMLmNvbSBSU0Eg\n" + - "U1NMIHN1YkNBMB4XDTE5MDYyODE0MDY1MFoXDTIxMDYyNzE0MDY1MFowHjEcMBoG\n" + - "A1UEAwwTdGVzdC1kdi1yc2Euc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP\n" + - "ADCCAQoCggEBAKlOrYr8fnHN8REfJDwgsBhJvnsU4beQIYYaOAzR8pmo8eq1U/K0\n" + - "uwRrgJ5K61V78zBO5qmZNiivBobViftObWrq2H6QhQsYdMYXld3SEnEotIIriRHY\n" + - "2PcqlgnFYXkqI0ZKs4kNs+j3GS0IwncJJwKtypmtLTCLK5J/kG7qB2MNfXZTIzKI\n" + - "iZza4RUM1j67Hv3fPJzNEJ9urfjaI4xcRh5airlzBWOBU9pW87P7BgQN7cNzJQji\n" + - "4DSvb1pSXv8sBbZk5fmG+81PyUxcfqj7Dbih0J1Aoq0YysHugsrK/kLz+CvqL9B2\n" + - "a1JMZfob9jzcA7XPjpggLc3az2Wvv3XKqokCAwEAAaOCAzswggM3MB8GA1UdIwQY\n" + - "MBaAFCYUfuDc16b34tQEJ99h8cLs5zLKMH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wRQIhANcF26iGoUuzZL6rGKduPtyyYusf\n" + - "03lBKSyvxabB9WuvAiBNbxR210L+JP89s/ONw53lYVr+1m/c3u9/9Wpu7c3n5jAN\n" + - "BgkqhkiG9w0BAQsFAAOCAgEACX2CbVM8MCIJ+2Wsap1v6VU2kpCS/FBIsLSTWNEf\n" + - "dREv1nh93qQ2CPIxj5kP/0EOUfq7tmQCJHMODVgz3iHrdxRB1E58nXHlZ6vUdrCo\n" + - "pD9d6Cp+AwvrOdv6MndVJgel9tVOAqAUblwdLzPNQHEcXoKnFEVv2SVQCmAYLlkP\n" + - "xX2RS73gseiit4QnVZOWi/wDhqMm7/iq8n7rL/f7+ly2+7e3LVjxd24HZkgxNgbn\n" + - "JDjYvIla+EvyrY8514Ru3Pf1UICY03VpYjE8R7SxrqcvOLtwvOVew6TuCUl6RNpl\n" + - "xeC9Oa1dgf+QRXN7LvmBXUP2nOCnwJE1ENvThPLw9BXLatVJgkA/v/mYWE5VjzIL\n" + - "hboPH2fNWemUv5QMzxUkqhgHgrhr8wnhI6xYIYciGDbmmfnItHex7bxktT7axoCD\n" + - "3dTQQe01YfK/LlkHtnBmJf/t0F33m8KXcQ51fic/TR2U5Tampxp2kdFdTyvRRqMl\n" + - "igqo3EhiPmB9bKsnXDA2AnvdjZT9uFwbUu5lNxjiMQcSZikjQAjJPgjCZ9BQOGbL\n" + - "eqgZcw2CxWMxFSTLL3TIBlNL/0GpRlTvr3IGyvHEr7EESXKD+Ar8XW+4VlMc1s8F\n" + - "cdtnus71s7wm+JUSXcM0WJUkRUvWqHlPi3Ucfe7k6x6BG9Mb42ECjorefPXvFu7v\n" + - "OT4=\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked-rsa-dv.ssl.com - // Issuer: CN=SSL.com RSA SSL subCA, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Serial number: 3f527e677d00558272ac90d1620b67f4 - // Valid from: Fri Jun 28 07:13:48 PDT 2019 until: Sun Jun 27 07:13:48 PDT 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHVzCCBT+gAwIBAgIQP1J+Z30AVYJyrJDRYgtn9DANBgkqhkiG9w0BAQsFADBp\n" + - "MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24x\n" + - "GDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjEeMBwGA1UEAwwVU1NMLmNvbSBSU0Eg\n" + - "U1NMIHN1YkNBMB4XDTE5MDYyODE0MTM0OFoXDTIxMDYyNzE0MTM0OFowITEfMB0G\n" + - "A1UEAwwWcmV2b2tlZC1yc2EtZHYuc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD\n" + - "ggEPADCCAQoCggEBAMKtMVeo+fMoeu1nLrcwxNAdfUysNKEhNZbMUOu9pzCChEvJ\n" + - "QHUicdrIZYl9m59uKUMh3Dj2nJLZ3a0pP4iWKcOEfCVMtA83/GDJl/BVj3XFbsMl\n" + - "+HSIu7R0vQM4enOztLabnOzvE4pQOFUp8u5SKO+hmB0zQ1iWkevYjJOf5DBZ7Zsa\n" + - "uF4qy9JqSF07gj/7FNqmqnfy6Z8yc8WAMjoUJrVrvmHQZeX/bCWxczFhYmAtYlwO\n" + - "7a914VP79b3Jq60HbLbYBdILnuU1Uu5L/JbG+hm/fH2meY30aWUaKcGY04ej6xuM\n" + - "hWsLhOrmcl3P7/E5UUojaR1Zvdtsn7jkQ8Y3iOsCAwEAAaOCA0EwggM9MB8GA1Ud\n" + - "IwQYMBaAFCYUfuDc16b34tQEJ99h8cLs5zLKMHwGCCsGAQUFBwEBBHAwbjBKBggr\n" + - "BgEFBQcwAoY+aHR0cDovL3d3dy5zc2wuY29tL3JlcG9zaXRvcnkvU1NMY29tLVN1\n" + - "YkNBLVNTTC1SU0EtNDA5Ni1SMS5jcnQwIAYIKwYBBQUHMAGGFGh0dHA6Ly9vY3Nw\n" + - "cy5zc2wuY29tMD0GA1UdEQQ2MDSC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e7wnUUWU46SWmBfDEQcGI7Hdomr67QBZNZz\n" + - "+wvnatMzrCPM7jPsb05Motz99NSk6yzQzR2c030sy1d78mRKJ/4wpidNDHpjuYL9\n" + - "cBp2gKf2/RxU74+BhugCjLqB1gojGO0CT1/g5a1QMtqRMM0EPrJrrtcEM0zG48yI\n" + - "P3b57Nl2ZbshRvY9bVi3of2SaPFQgu99/zAlerPUThz4O2CskOgKt77y6KOgCbBp\n" + - "7fQF6vh/aOm0Xba2Z0CtB+uVN2g4+LwyuovOy+JyjGKv7GxRKEQmGZsRLDVpxOs5\n" + - "W47K+iuOEhTRWRkStfuk2LcCLwTrgxHv2/Wo+80ME/7wxGKs1IzlkcFtFLhaeN4p\n" + - "QsmADpcyBfeWmvTdKgaVBOE2F/nenIiKpo+0jcoMAW6JgMD+otn8gofBq+Za1N4X\n" + - "xckvLWbMDAj4lELBHXu7gLHHLJCL9GGPD5HKjH/RyLtKKaRgT/AV6jl/woKTAzGF\n" + - "SPqgNQsu+sCdUbO0nDONkXDxhfan8XNrd32KMPGucJySiyjpHkurobMuGbs/LQzd\n" + - "JLTSTIIIPpEHBk7PHRGPSFewIhi0aDhupgZLU9UGrLRw/xV/KlGqTcGFWBvvOC+I\n" + - "CSZFRr0hWBv/dfw=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Fri Jun 28 07:25:02 PDT 2019", System.out); - } -} - -class SSLCA_EV_RSA { - - // Owner: CN=SSL.com EV SSL Intermediate CA RSA R3, O=SSL Corp, L=Houston, ST=Texas, C=US - // Issuer: CN=SSL.com EV Root Certification Authority RSA R2, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Serial number: 56b629cd34bc78f6 - // Valid from: Wed May 31 11:14:37 PDT 2017 until: Fri May 30 11:14:37 PDT 2042 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIG4DCCBMigAwIBAgIQA6P00GAwUqM3zjgKiDAxjDANBgkqhkiG9w0BAQsFADCB\n" + - "gjELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9u\n" + - "MRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNzA1BgNVBAMMLlNTTC5jb20gRVYg\n" + - "Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EgUjIwHhcNMTkwMzI2MTc0\n" + - "NjUzWhcNMzQwMzIyMTc0NjUzWjByMQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4\n" + - "YXMxEDAOBgNVBAcMB0hvdXN0b24xETAPBgNVBAoMCFNTTCBDb3JwMS4wLAYDVQQD\n" + - "DCVTU0wuY29tIEVWIFNTTCBJbnRlcm1lZGlhdGUgQ0EgUlNBIFIzMIICIjANBgkq\n" + - "hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkby+CNUTyO0wakMc6VeJxQLGcTtfwJG6\n" + - "W9MYhMBWW22YUMtfCL7at/ey89eCc0cNy9uekJqitJe78Ion5qHBLfSpahYWttzr\n" + - "LflXkdlPz6xsZuw7F/tp6oYrcUpRIX92ci0EhORtb5xoX7rwzrBnG2Jv7fPn8JGj\n" + - "wmvYPS0meVkuKGtdR/s3dkl0tDraq2xti8cN7W9VawzLDL9yNyEw2GWAp3M5Uqex\n" + - "Yjh9HY5w/4bgk7K0KSw+2njaXCEa2MugM6txHDKjocVFBe7G8JPMKkCcbbrgZo/q\n" + - "ygTnIY8q7B1XQG2wrdsu4LTo9ijIYmoZHBAKN/XCdPecQYF9cHrv6NjVUcMrNmHT\n" + - "B43NrIvrXmm3lZJU4PZNUhb7YrDtpN+rV6zSaKAu/EArGDzYv8iHKT2E+wjhwqOC\n" + - "WnXv1qSa//xvN6RSoDM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Gl299mTJ4jcgic+Oalbz9SZJ+EiW/aUDSpZ2zawi\n" + - "ackPWmAbk0y0gouOymrwOJZTuq+AJEJ6M+WSVdknwE7YwDpVMszHXS38BS1A5N1i\n" + - "rzW3BcARHbtCb00vEy2mzW5JPM2LjkzfgJ0lBiyDCE3ZeBeUtKmcdFUFrHwHl3gV\n" + - "aRipD+xMa1hGOTh33eMzwWoRxvk6o7y73Sy6XBfycN+8LhXUZT0X8STmWtBtLSMp\n" + - "blWMjuuFyUVQvIj05N7hORY/LhdQhEx8kVwS5RkLVSpRnohdk+nI69yIA7EwZKlw\n" + - "kKEsDqlVOeDYWVWQANDC55kJ7nOyJbqtGJqImwWXdQcf37fi80cf+mKOYs5vNmkx\n" + - "D9bwFWsKnP71x0liSlv8z79vRAo8FJwTgXRNO1c0ACf0rXEJy3GRAXRWiTvuGahR\n" + - "JVM3Jnn0G6o3+vTfwa7CKR/9Jc4t25iRU3xmSgiusg4u8i5x\n" + - "-----END CERTIFICATE-----"; - - // Owner: OID.1.3.6.1.4.1.311.60.2.1.3=US, OID.1.3.6.1.4.1.311.60.2.1.2=Nevada, STREET=3100 Richmond Ave, - // OID.2.5.4.15=Private Organization, OID.2.5.4.17=77098, CN=test-ev-rsa.ssl.com, SERIALNUMBER=NV20081614243, - // O=SSL Corp, L=Houston, ST=Texas, C=US - // Issuer: CN=SSL.com EV SSL Intermediate CA RSA R3, O=SSL Corp, L=Houston, ST=Texas, C=US - // Serial number: 558089b221d7cd9c7a4bc4a7fd7e2969 - // Valid from: Mon Jul 01 13:28:01 PDT 2019 until: Wed Jun 30 13:28:01 PDT 2021 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIISTCCBjGgAwIBAgIQVYCJsiHXzZx6S8Sn/X4paTANBgkqhkiG9w0BAQsFADBy\n" + - "MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24x\n" + - "ETAPBgNVBAoMCFNTTCBDb3JwMS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a/fVWO9VZD\n" + - "uPPnAZ6jf2G3MA0GCSqGSIb3DQEBCwUAA4ICAQAcYH/+o9N0E3H9h0GfohGElfRw\n" + - "XPUnQI3/CZwuG0ShCbpVspvUkuR/P0Hjr9XgDVy39R9SOaEDK3/coG8/Ry56Lrm0\n" + - "17v+yeEzAVK51eQeinHoCYc9TIwmyrwt36JE/zIwnDB623Y4ccxYN5LZxjVx668/\n" + - "xj3JffaY5185qPjAqkjLUzj9TeeAJk/ws1YXbQJvO4CZV2QXrishC+dEoqvfOe/u\n" + - "sMHcMJy+cFrPhe4cC7s9fHeYTpF36yvfWrgjGwDki/9zgRhOvDuM72dIMkrcHkZi\n" + - "OvZMgyoXz/Nw3D514K9BSt6xRB2qGzI8fx0EOGzEEjX1Zdie2uVDy9aC8k8TjQAM\n" + - "v/YT7Bggpv300hWvBGw0QT8l7Nk1PZFBagAhqRCKRsR1pUZ8CyZzwNkNyUSYV4Or\n" + - "n0vYwVEgpMeSMu/ObWwWPM7QKSNcSSIV5lxmsZX+wS76OpDMHm27P94RTEePF4sG\n" + - "QmvY6hgHSlREJUL0vyGGY2Rbm3cL3zaM4qTquN18v61uUVKakELYIcRZwVTyBj5M\n" + - "KxOkjGXnLYpDOLFHD4WB1q7J+SorG43V+nbmTEN5fshGUjjWoz5ykfErnyJa1+Py\n" + - "FXWoPFb425DelhuDe94btROuJELRfzhqDXoKrhDgSQGV2qM3sk6uIPOaoH4N31ko\n" + - "C41bezSdJ5r4mif8iA==\n" + - "-----END CERTIFICATE-----"; - - // Owner: OID.1.3.6.1.4.1.311.60.2.1.3=US, OID.1.3.6.1.4.1.311.60.2.1.2=Nevada, STREET=3100 Richmond Ave, - // OID.2.5.4.15=Private Organization, OID.2.5.4.17=77098, CN=revoked-rsa-ev.ssl.com, SERIALNUMBER=NV20081614243, - // O=SSL Corp, L=Houston, ST=Texas, C=US - // Issuer: CN=SSL.com EV SSL Intermediate CA RSA R3, O=SSL Corp, L=Houston, ST=Texas, C=US - // Serial number: 1ea7f53492bded2d425135bdf525889f - // Valid from: Mon Jul 01 13:29:02 PDT 2019 until: Wed Jun 30 13:29:02 PDT 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIIUzCCBjugAwIBAgIQHqf1NJK97S1CUTW99SWInzANBgkqhkiG9w0BAQsFADBy\n" + - "MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24x\n" + - "ETAPBgNVBAoMCFNTTCBDb3JwMS4wLAYDVQQDDCVTU0wuY29tIEVWIFNTTCBJbnRl\n" + - "cm1lZGlhdGUgQ0EgUlNBIFIzMB4XDTE5MDcwMTIwMjkwMloXDTIxMDYzMDIwMjkw\n" + - "MlowgfQxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91\n" + - "c3RvbjERMA8GA1UECgwIU1NMIENvcnAxFjAUBgNVBAUTDU5WMjAwODE2MTQyNDMx\n" + - "HzAdBgNVBAMMFnJldm9rZWQtcnNhLWV2LnNzbC5jb20xDjAMBgNVBBEMBTc3MDk4\n" + - "MR0wGwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjEaMBgGA1UECQwRMzEwMCBS\n" + - "aWNobW9uZCBBdmUxFzAVBgsrBgEEAYI3PAIBAgwGTmV2YWRhMRMwEQYLKwYBBAGC\n" + - "NzwCAQMTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlqZwW2n7\n" + - "Ot8ujRGyCkzf/FqkiIi6+mq7QXlBMsZVNmLcWzatoS9K8WOviU+lmYpdV3rkrX1v\n" + - "e/FZBwtBR/x1FRN3CPoGcO0Yu6CZjknHtyyNQ36mwUy7UW+rQKYjDfU4aXme4bP8\n" + - "Dk2rUYQtM/xpYHKDk9x7Vg4zAmk+L0LQmSU0103DRuANnxOszEK196UbLE4W+2+i\n" + - "Xat40jHW3KU2PxVfCajgB1mdrDt2b5j/qD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+301ev0twX\n" + - "0w6RymKcvEbcuSDHkzOYWxc1cqwOxjA=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Mon Jul 01 20:53:13 PDT 2019", System.out); - } -} - -class SSLCA_ECC { - - // Owner: CN=SSL.com SSL Intermediate CA ECC R2, O=SSL Corp, L=Houston, ST=Texas, C=US - // Issuer: CN=SSL.com Root Certification Authority ECC, O=SSL Corporation, L=Houston, ST=Texas, C=US - // Serial number: 75e6dfcbc1685ba8 - // Valid from: Fri Feb 12 10:14:03 PST 2016 until: Tue Feb 12 10:14:03 PST 2041 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + - "MIIDejCCAv+gAwIBAgIQHNcSEt4VENkSgtozEEoQLzAKBggqhkjOPQQDAzB8MQsw\n" + - "CQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24xGDAW\n" + - "BgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNvbSBSb290IENl\n" + - "cnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzAeFw0xOTAzMDcxOTQyNDJaFw0zNDAz\n" + - "MDMxOTQyNDJaMG8xCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEQMA4GA1UE\n" + - "BwwHSG91c3RvbjERMA8GA1UECgwIU1NMIENvcnAxKzApBgNVBAMMIlNTTC5jb20g\n" + - "U1NMIEludGVybWVkaWF0ZSBDQSBFQ0MgUjIwdjAQBgcqhkjOPQIBBgUrgQQAIgNi\n" + - "AASEOWn30uEYKDLFu4sCjFQ1VupFaeMtQjqVWyWSA7+KFljnsVaFQ2hgs4cQk1f/\n" + - "RQ2INSwdVCYU0i5qsbom20rigUhDh9dM/r6bEZ75eFE899kSCI14xqThYVLPdLEl\n" + - "+dyjggFRMIIBTTASBgNVHRMBAf8ECDAGAQH/AgEAMB8GA1UdIwQYMBaAFILRhXMw\n" + - "5zUE044CkvvlpNHEIejNMHgGCCsGAQUFBwEBBGwwajBGBggrBgEFBQcwAoY6aHR0\n" + - "cDovL3d3dy5zc2wuY29tL3JlcG9zaXRvcnkvU1NMY29tLVJvb3RDQS1FQ0MtMzg0\n" + - "LVIxLmNydDAgBggrBgEFBQcwAYYUaHR0cDovL29jc3BzLnNzbC5jb20wEQYDVR0g\n" + - "BAowCDAGBgRVHSAAMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATA7BgNV\n" + - "HR8ENDAyMDCgLqAshipodHRwOi8vY3Jscy5zc2wuY29tL3NzbC5jb20tZWNjLVJv\n" + - "b3RDQS5jcmwwHQYDVR0OBBYEFA10Zgpen+Is7NXCXSUEf3Uyuv99MA4GA1UdDwEB\n" + - "/wQEAwIBhjAKBggqhkjOPQQDAwNpADBmAjEAxYt6Ylk/N8Fch/3fgKYKwI5A011Q\n" + - "MKW0h3F9JW/NX/F7oYtWrxljheH8n2BrkDybAjEAlCxkLE0vQTYcFzrR24oogyw6\n" + - "VkgTm92+jiqJTO5SSA9QUa092S5cTKiHkH2cOM6m\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=test-dv-ecc.ssl.com - // Issuer: CN=SSL.com SSL Intermediate CA ECC R2, O=SSL Corp, L=Houston, ST=Texas, C=US - // Serial number: 1bfbd8e4bea894f3d1887c50e7d366d7 - // Valid from: Fri Jun 28 06:58:27 PDT 2019 until: Sun Jun 27 06:58:27 PDT 2021 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIE9TCCBHqgAwIBAgIQG/vY5L6olPPRiHxQ59Nm1zAKBggqhkjOPQQDAzBvMQsw\n" + - "CQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNV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4jEOZX73zbv9WjUdWNv9K\n" + - "tWDBtOr/XqCDDwAAAWueaoEnAAAEAwBIMEYCIQCdy3N9w0pem1XShE/rkVSpHxQb\n" + - "8QdUu3E6R+oncxOGXgIhAJoWg2gJYc9DWDl5ImnrqsmVS6OPgSQRvDsjRIN9gH7a\n" + - "AHcAu9nfvB+KcbWTlCOXqpJ7RzhXlQqrUugakJZkNo4e0YUAAAFrnmqArQAABAMA\n" + - "SDBGAiEAs2yfi9e1h6dTQbe4WPd7+5qf7kvP7Vr2k0nAtBS1IgECIQCQYL9he9J4\n" + - "Bh5cpQezTVPgLAOGcf5xIcCrBs1QJe66/AB3AFWB1MIWkDYBSuoLm1c8U/DA5Dh4\n" + - "cCUIFy+jqh0HE9MMAAABa55qgaEAAAQDAEgwRgIhAI/27txsvzpbBXkMICi/UOzE\n" + - "t8uZidbF9KSwmGRPT/6gAiEAhm/VeWHDeWK8gFMU+f0/x4jK7UbzySGBvPzbPpNd\n" + - "EDwwCgYIKoZIzj0EAwMDaQAwZgIxAJKn8Hr68Z/2rA+VHfZo8eeIFaZ3nvSvQO92\n" + - "1Byl6cPAm8DsdCnYT16uNSL8Zb5IQAIxAOFLsqPDCSAYkpgutAnVgwI+c549SIRU\n" + - "k8ol+wUx6zgMmt8VHYagyj6IO0GRDjm/eA==\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=revoked-ecc-dv.ssl.com - // Issuer: CN=SSL.com SSL Intermediate CA ECC R2, O=SSL Corp, L=Houston, ST=Texas, C=US - // Serial number: 423c2b57dfa379d0c45ffceb6284ed99 - // Valid from: Fri Jun 28 07:09:30 PDT 2019 until: Sun Jun 27 07:09:30 PDT 2021 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIE+TCCBH+gAwIBAgIQQjwrV9+jedDEX/zrYoTtmTAKBggqhkjOPQQDAzBvMQsw\n" + - "CQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24xETAP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9io\n" + - "/ijA2uaCvtjLMbU/0zOWtbaBqAAAAWuedJ/tAAAEAwBGMEQCIGPBF546Tn/lzB22\n" + - "ICpFLOWOIyIOPwL9S4ikS8Vt1aFTAiBe8mp/WCJnV7WxMIVWEUSLVOYn7erwyu6D\n" + - "hWNIST4W8wB2AG9Tdqwx8DEZ2JkApFEV/3cVHBHZAsEAKQaNsgiaN9kTAAABa550\n" + - "oQEAAAQDAEcwRQIhAJ3nwLI7kLP2SKicFKuJoqRYKE/FR2Ff65WL+iWxm/6nAiAJ\n" + - "cd9EKnBETwM9qQfKoSSs2oTQL4QjSKJZi/sPfKQaagB2ALvZ37wfinG1k5Qjl6qS\n" + - "e0c4V5UKq1LoGpCWZDaOHtGFAAABa550oH4AAAQDAEcwRQIhAIo6k5BMSFN3FnD4\n" + - "UFbyJJG/Bujh+OFTYzVM8vuIBoU0AiAhBe+air4wHvd68ykK6xOPv9Qshje9F6LC\n" + - "gxTqbMOEkDAKBggqhkjOPQQDAwNoADBlAjEAyayBtbcCQB0fE+cCc7OHLuNvb9tl\n" + - "uiHWy/Ika6IA72WJLLmED971ik08OMa2mGt4AjAklxdElQ5Z/nSeJ2CNEwD7pcYz\n" + - "468kkrMoGU2lk3QmwcXZscPIoh4Pwew6QteY4J0=\n" + - "-----END CERTIFICATE-----"; - - public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception { - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Fri Jun 28 07:59:20 PDT 2019", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TWCAGlobalCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TWCAGlobalCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TWCAGlobalCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TWCAGlobalCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8305975 - * @summary Interoperability tests with TWCA Global Root CA from TAIWAN-CA - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath TWCAGlobalCA OCSP - * @run main/othervm -Djava.security.debug=certpath TWCAGlobalCA CRL - */ - -/* - * Obtain TLS test artifacts for TWCA Global Root CA from: - * - * Valid TLS Certificates: - * https://evssldemo6.twca.com.tw - * - * Revoked TLS Certificates: - * https://evssldemo7.twca.com.tw - */ -public class TWCAGlobalCA { - - // Owner: CN=TWCA Global EVSSL Certification Authority, OU=Global EVSSL Sub-CA, O=TAIWAN-CA, C=TW - // Issuer: CN=TWCA Global Root CA, OU=Root CA, O=TAIWAN-CA, C=TW - // Serial number: 40013304f70000000000000cc042cd6d - // Valid from: Thu Aug 23 02:53:30 PDT 2012 until: Fri Aug 23 08:59:59 PDT 2030 - private static final String INT = "-----BEGIN CERTIFICATE-----\n" + -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AMD6gPKA6hjhodHRwOi8vUm9vdENBLnR3Y2EuY29tLnR3L1RXQ0FS\n" + - "Q0EvZ2xvYmFsX3Jldm9rZV80MDk2LmNybDASBgNVHRMBAf8ECDAGAQH/AgEAMDgG\n" + - "CCsGAQUFBwEBBCwwKjAoBggrBgEFBQcwAYYcaHR0cDovL1Jvb3RPY3NwLnR3Y2Eu\n" + - "Y29tLnR3LzANBgkqhkiG9w0BAQsFAAOCAgEAaOmLaZ2+WN2EtB6feuSV5KnL88ck\n" + - "I9jsUTB4YtKsv0ViORkeBMCQur5OoAgRE9VYdRVlWHN0zJAX232fdoZmnajl8gtj\n" + - "u0AOOyDDJ7Vlh38rDMRlX/u+MS2DFcsq5Vd3EMwJsWWFR9D3Dcey+Tu9uEmEdqeB\n" + - "+Erd4YjCeV9PyOW3SzPQ47RdW6XYmHArPh65/LcmSxTn/lxQy/NEBGGWqhm6s6n1\n" + - "49mPq4MtQcMLo/NBI+8jv7BVjnThbbEh2edHHxMNiAd5kLZFDCyJuFkoezjWL4AH\n" + - "ratXdoHtqvqtPoy97LyGrLrJeh+0hkO9u8QOt2gF7BEhNfid7o5dnsPRk+8l77Hn\n" + - "T1dvBs++M0r0QG4AWMSMj9uUn6rhl4FGTvAsyB1fA8p/xCLoIEetIpKRP3BD+ve2\n" + - "eYjWPorR/0W77iMTeoQEeuxDIxi2J/U9QLKKvzzqBy1TYrqqPe5YxqHLNAcfHZvo\n" + - "BTPPbtP0WAiXrJiELTYcqFXETvQcGw0XjoUZNvJE8RD7vssSNT17RKU8iBRX7CbL\n" + - "AB3T8gYykPMJTUqQSmdgEdVRBcqRMMdU+XRAEoU/Mz5oHAkm3ZNTDNwsEp2Dg1/b\n" + - "qzfPMhg4/3/YyWzGrzNeCSWZkjYImAzLCvN0D5rbdVHEmFIrEJt+igocGozroq5x\n" + - "DT5KhixlrqexzWE=\n" + - "-----END CERTIFICATE-----"; - - // Owner: OID.2.5.4.17=100, STREET="10F.,NO.85,Yanping S. Rd.,Taipei City 100,Taiwan (R.O.C)", - // SERIALNUMBER=70759028, OID.1.3.6.1.4.1.311.60.2.1.3=TW, OID.1.3.6.1.4.1.311.60.2.1.2=Taiwan, - // OID.1.3.6.1.4.1.311.60.2.1.1=Taipei, OID.2.5.4.15=Private Organization, - // CN=evssldemo6.twca.com.tw, O=TAIWAN-CA INC., L=Taipei, ST=Taiwan, C=TW - // Issuer: CN=TWCA Global EVSSL Certification Authority, OU=Global EVSSL Sub-CA, - // O=TAIWAN-CA, C=TW - // Serial number: 47e70000001258ff71d89af7f0353fef - // Valid from: Thu Mar 02 00:49:56 PST 2023 until: Sun Mar 31 08:59:59 PDT 2024 - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIH7zCCBtegAwIBAgIQR+cAAAASWP9x2Jr38DU/7zANBgkqhkiG9w0BAQsFADBz\n" + - "MQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRwwGgYDVQQLExNHbG9i\n" + - "YWwgRVZTU0wgU3ViLUNBMTIwMAYDVQQDEylUV0NBIEdsb2JhbCBFVlNTTCBDZXJ0\n" + - "aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0yMzAzMDIwODQ5NTZaFw0yNDAzMzExNTU5\n" + - "NTlaMIIBMzELMAkGA1UEBhMCVFcxDzANBgNVBAgTBlRhaXdhbjEPMA0GA1UEBxMG\n" + - "VGFpcGVpMRcwFQYDVQQKEw5UQUlXQU4tQ0EgSU5DLjEfMB0GA1UEAxMWZXZzc2xk\n" + - "ZW1vNi50d2NhLmNvbS50dzEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24x\n" + - "FzAVBgsrBgEEAYI3PAIBARMGVGFpcGVpMRcwFQYLKwYBBAGCNzwCAQITBlRhaXdh\n" + - "bjETMBEGCysGAQQBgjc8AgEDEwJUVzERMA8GA1UEBRMINzA3NTkwMjgxQTA/BgNV\n" + - "BAkTODEwRi4sTk8uODUsWWFucGluZyBTLiBSZC4sVGFpc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J5zZHppolGPtuFYMUcatiqv//pH/5piwtlYSkbwMj5nYidSrSBciBzO53HFk1pE\n" + - "TABXFcoK3gmhWM04lysmJMwAzRUbNQVizpGDICbRjCOVnwCbutnSnka8pDHkq4Zy\n" + - "BrUeZe2xJe8jWvukwqvNzIIvwg==\n" + - "-----END CERTIFICATE-----"; - - // Owner: OID.2.5.4.17=100, STREET="10F.,NO.85,Yanping S. Rd.,Taipei City 100,Taiwan (R.O.C)", - // SERIALNUMBER=70759028, OID.1.3.6.1.4.1.311.60.2.1.3=TW, OID.1.3.6.1.4.1.311.60.2.1.2=Taiwan, - // OID.1.3.6.1.4.1.311.60.2.1.1=Taipei, OID.2.5.4.15=Private Organization, - // CN=evssldemo7.twca.com.tw, O=TAIWAN-CA INC., L=Taipei, ST=Taiwan, C=TW - // Issuer: CN=TWCA Global EVSSL Certification Authority, OU=Global EVSSL Sub-CA, - // O=TAIWAN-CA, C=TW - // Serial number: 47e70000001258f036a5b513091ccb2e - // Valid from: Tue Feb 07 02:03:08 PST 2023 until: Thu Mar 07 07:59:59 PST 2024 - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" + - "MIIHdjCCBl6gAwIBAgIQR+cAAAASWPA2pbUTCRzLLjANBgkqhkiG9w0BAQsFADBz\n" + - "MQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRwwGgYDVQQLExNHbG9i\n" + - "YWwgRVZTU0wgU3ViLUNBMTIwMAYDVQQDEylUV0NBIEdsb2JhbCBFVlNTTCBDZXJ0\n" + - "aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0yMzAyMDcxMDAzMDhaFw0yNDAzMDcxNTU5\n" + - "NTlaMIIBMzELMAkGA1UEBhMCVFcxDzANBgNVBAgTBlRhaXdhbjEPMA0GA1UEBxMG\n" + - "VGFpcGVpMRcwFQYDVQQKEw5UQUlXQU4tQ0EgSU5DLjEfMB0GA1UEAxMWZXZzc2xk\n" + - "ZW1vNy50d2NhLmNvbS50dzE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BGuWFjEnq4lO\n" + - "xL1C3M2mYAEC+Beb7Xyq1rcu97p4P8igJYM+VfwXNwYYRCXUr9f4ESD7t5vXlYoE\n" + - "c4m5KiBQD9XtZS77QRon9JCQklxTvMkxuLwWvSdzicEUzWeFp+kN/fcXL2SVsb17\n" + - "xDPMMsMMh7L/f+uMWDYZ+wH17LYQxOLi7VXT3fv8nl2X2iD3d4CCh0Tu\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Thu Mar 23 17:30:19 PDT 2023", System.out); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TeliaSoneraCA.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TeliaSoneraCA.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TeliaSoneraCA.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/TeliaSoneraCA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8210432 - * @summary Interoperability tests with TeliaSonera Root CA v1 - * @build ValidatePathWithParams - * @run main/othervm -Djava.security.debug=certpath TeliaSoneraCA OCSP - * @run main/othervm -Djava.security.debug=certpath TeliaSoneraCA CRL - */ - -/* - * Obtain TLS test artifacts for TeliaSonera Root CA v1 from: - * - * Valid TLS Certificates: - * https://juolukka.cover.sonera.net:10443/ - * - * Revoked TLS Certificates: - * https://juolukka.cover.sonera.net:10444/ - */ -public class TeliaSoneraCA { - - // Owner: CN=TeliaSonera Server CA v2, O=TeliaSonera, C=FI - // Issuer: CN=TeliaSonera Root CA v1, O=TeliaSonera - private static final String INT = "-----BEGIN CERTIFICATE-----\n" - + "MIIHHjCCBQagAwIBAgIQTEYq9tv794BPhMF8/qlytjANBgkqhkiG9w0BAQsFADA3\n" - + "MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwWVGVsaWFTb25lcmEgUm9v\n" - + "dCBDQSB2MTAeFw0xNDEwMTYwODA5NTdaFw0zMjEwMTYwNTA0MDBaMEYxCzAJBgNV\n" - + "BAYTAkZJMRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEhMB8GA1UEAwwYVGVsaWFTb25l\n" - + "cmEgU2VydmVyIENBIHYyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA\n" - + "rwQN5rfRLbVAiYWLJF9SI4YLm8oqrtf8OjGybgoLyiMIo8nhY/atuGRFWCQNOnUK\n" - + "caZn29C360PlC5yYrsrSHuouROisqHSJcgA7HvV+37Rcry7daeDj6rfyx4yI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cF7qGrJTkTx0Ccy4BuuY05hJckd72E7WdmjN7DDeosghgWZNV/6D7N5tfxo\n" - + "nlU=\n" - + "-----END CERTIFICATE-----"; - - // Owner: CN=juolukka.cover.sonera.net, OU=security, O=Telia Finland Oyj, L=helsinki, C=FI - // Issuer: CN=TeliaSonera Server CA v2, O=TeliaSonera, C=FI - private static final String VALID = "-----BEGIN CERTIFICATE-----\n" + - "MIIHiDCCBXCgAwIBAgIPAWOq14hk136UDQY3WSjLMA0GCSqGSIb3DQEBCwUAMEYx\n" + - "CzAJBgNVBAYTAkZJMRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEhMB8GA1UEAwwYVGVs\n" + - "aWFTb25lcmEgU2VydmVyIENBIHYyMB4XDTE4MDUyOTA3NDA0MVoXDTE5MDUyOTA3\n" + - "NDA0MVowczELMAkGA1UEBhMCRkkxETAPBgNVBAcMCGhlbHNpbmtpMRowGAYDVQQK\n" + - "DBFUZWxpYSBGaW5sYW5kIE95ajERMA8GA1UECwwIc2VjdXJpdHkxIjAgBgNVBAMM\n" + - "GWp1b2x1a2thLmNvdmVyLnNvbmVyYS5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IB\n" + - "DwAwggEKAoIBAQDLks9F8ZUqV9G4jn3fY234OX09Dmqqtuk0qAmjWpF0JAn2o64t\n" + - "whVxFLx9e2IwUPTQgyo6FwRsiT19m99BhgxYnJOxVRwURxSL3mqlV9gX4oFMmT4O\n" + - "EOYEjaJXi8ne1pJX80y2hVQ48XqgODnKdKZVwa5YoeWZQJiaq+C5JkMDN8qzpiyQ\n" + - "X3EfJspLkKy2E+UVxWmfnyf0v70ES9TQ8qgxwvsf7LRZ8Jixq7TTO5VbqWsdBvJC\n" + - "9Zm2aBOYJ7ptSZQ5YDfeUJG2c9S/zFmngoPnTrvAZwUeU3YTrbdZQy899ZOatWac\n" + - "6lHUYU2EagEmbj/jtIvJ6wMbzhleIXRQFWibAgMBAAGjggNEMIIDQDAfBgNVHSME\n" + - "GDAW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lCBcvo6odBxPTDAAAAWOq16YXAAAEAwBHMEUCIQCCkCL2zn/AoMVI\n" + - "BdsoJelUBLsAnQ+GlIafiyZYcCwhBAIgdsFM05eNmL5hfn3+WtfgmipwcK1qp7kO\n" + - "ONzO69aqrnEwDQYJKoZIhvcNAQELBQADggIBAIl5UWSwCXF85+2lU6t89K7I4TvZ\n" + - "Ggof0NLngea9qxBq00opfnl9i2LPRnsjh9s3iA29i2daTEuJn3qt3Ygcm27Jd7WM\n" + - "5StcxQ483GAaL5s5m2QqkZB8eLfez3tIyCMGCAyixBDNRNPVI4xZr6sSOenWtipo\n" + - "gMt+/gvRIMdMT79IXPFz4W9RWCwnfJNOlfH2OkS3KZYaPSaEvs6sfMW1DDZosrBy\n" + - "6F+DITPLllOVSE4+PTxvXLKVy+srFwF1VocQXKkWMHQ7AfWNnOGzb7B1qg7gsw0n\n" + - "axqinyCjkhMpHpcVtmD9Pi15HLFDIy9yI2S+FHJQfhUSmM/LdCWzQpnee6/Wo+uw\n" + - "p0Jg2v6v9GGaqfpuiVJPFN9dOv3OjMU7DL5lgMRWFRo2T8+wBHXDyBhT0W0y5kRJ\n" + - "eWA7t6CnkziHuaOihZAHUH3nn5exjqUFVS0ThbF6hxN7HAlq/xIbTKlZjkLlc14W\n" + - "fB8vkxJyy/tgBZ4dCj9Y1Y32d4eFT5JZJgqgkN59SmX56BswNXncGrk/vWZFFx+g\n" + - "9dgb8QSe8KseD1iSLc7SsqVDv8NPYdaI3eZ90W8Wv0/CDls321O6UbAmURzQwFGB\n" + - "w8WnteoVBi6Wf6M1TxIfJsXBYeIN0BB6AYc8cmZIOtx2C8aH4JJT45MyFnBv3ac5\n" + - "Ahs9pGn/+K+5yb2e\n" + - "-----END CERTIFICATE-----"; - - // Owner: CN=juolukka.cover.sonera.net, OU=Security, O=TeliaSonera Finland, L=Helsinki, C=FI - // Issuer: CN=TeliaSonera Server CA v2, O=TeliaSonera, C=FI - private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n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/qSwO3NyLm8uAhQD4x+OPHrmQ/s16j45\n" + - "Ib53UHj1k6byXGUqDgzFBsmEPV6Shf2C4/HcRHpAX8wQx3xVwDtRzDpNUR6vnNfi\n" + - "PwzRU1xsQKd8llmgl4l+fYV0tBA=\n" + - "-----END CERTIFICATE-----"; - - public static void main(String[] args) throws Exception { - - ValidatePathWithParams pathValidator = new ValidatePathWithParams(null); - - if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) { - pathValidator.enableCRLCheck(); - } else { - // OCSP check by default - pathValidator.enableOCSPCheck(); - } - - // Validate valid - pathValidator.validate(new String[]{VALID, INT}, - ValidatePathWithParams.Status.GOOD, null, System.out); - - // Validate Revoked - pathValidator.validate(new String[]{REVOKED, INT}, - ValidatePathWithParams.Status.REVOKED, - "Thu Dec 22 23:14:55 PST 2016", System.out); - - // reset validation date back to current date - pathValidator.resetValidationDate(); - } -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ValidatePathWithURL.java openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ValidatePathWithURL.java --- openjdk-lts-11.0.21+9/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ValidatePathWithURL.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/ValidatePathWithURL.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,231 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jtreg.SkippedException; + +import javax.net.ssl.*; +import javax.security.auth.x500.X500Principal; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URL; +import java.security.*; +import java.security.cert.*; +import java.security.cert.Certificate; + +public class ValidatePathWithURL { + + private final X509Certificate rootCertificate; + private final X500Principal rootPrincipal; + + /** + * Enables the certificate revocation checking and loads the certificate from + * cacerts file for give caAlias + * + * @param caAlias CA alias for CA certificate in cacerts file + * @throws Exception when fails to get CA certificate from cacerts file + */ + public ValidatePathWithURL(String caAlias) throws Exception { + System.setProperty("com.sun.net.ssl.checkRevocation", "true"); + Security.setProperty("ssl.TrustManagerFactory.algorithm", "SunPKIX"); + + // some test sites don't have correct hostname specified in test certificate + HttpsURLConnection.setDefaultHostnameVerifier(new CustomHostnameVerifier()); + + String FS = System.getProperty("file.separator"); + String CACERTS_STORE = + System.getProperty("test.jdk") + FS + "lib" + FS + "security" + FS + "cacerts"; + + KeyStore cacerts = KeyStore.getInstance("PKCS12"); + try (FileInputStream fis = new FileInputStream(CACERTS_STORE)) { + cacerts.load(fis, null); + } + + rootCertificate = (X509Certificate) cacerts.getCertificate(caAlias); + rootPrincipal = rootCertificate.getSubjectX500Principal(); + } + + /** + * Enable revocation checking using OCSP and disables CRL check + */ + public static void enableOCSPOnly() { + System.setProperty("com.sun.security.enableCRLDP", "false"); + Security.setProperty("ocsp.enable", "true"); + } + + /** + * Enable revocation checking using CRL + */ + public static void enableCRLOnly() { + System.setProperty("com.sun.security.enableCRLDP", "true"); + Security.setProperty("ocsp.enable", "false"); + } + + /** + * Enable revocation checking using OCSP or CRL + */ + public static void enableOCSPAndCRL() { + System.setProperty("com.sun.security.enableCRLDP", "true"); + Security.setProperty("ocsp.enable", "true"); + } + + /** + * Logs revocation settings + */ + public static void logRevocationSettings() { + System.out.println("====================================================="); + System.out.println("CONFIGURATION"); + System.out.println("====================================================="); + System.out.println("http.proxyHost :" + System.getProperty("http.proxyHost")); + System.out.println("http.proxyPort :" + System.getProperty("http.proxyPort")); + System.out.println("https.proxyHost :" + System.getProperty("https.proxyHost")); + System.out.println("https.proxyPort :" + System.getProperty("https.proxyPort")); + System.out.println("https.socksProxyHost :" + + System.getProperty("https.socksProxyHost")); + System.out.println("https.socksProxyPort :" + + System.getProperty("https.socksProxyPort")); + System.out.println("jdk.certpath.disabledAlgorithms :" + + Security.getProperty("jdk.certpath.disabledAlgorithms")); + System.out.println("com.sun.security.enableCRLDP :" + + System.getProperty("com.sun.security.enableCRLDP")); + System.out.println("ocsp.enable :" + Security.getProperty("ocsp.enable")); + System.out.println("====================================================="); + } + + /** + * Validates end entity certificate used in provided test URL using + * HttpsURLConnection. Validation is skipped on network error or if + * the certificate is expired. + * + * @param testURL URL to validate + * @param revokedCert if true then validate is REVOKED certificate + * @throws Exception on failure to validate certificate + */ + public void validateDomain(final String testURL, + final boolean revokedCert) + throws Exception { + System.out.println(); + System.out.println("===== Validate " + testURL + "====="); + if (!validateDomainCertChain(testURL, revokedCert)) { + throw new RuntimeException("Failed to validate " + testURL); + } + System.out.println("======> SUCCESS"); + } + + private boolean validateDomainCertChain(final String testURL, + final boolean revokedCert) + throws Exception { + HttpsURLConnection httpsURLConnection = null; + try { + URL url = new URL(testURL); + httpsURLConnection = (HttpsURLConnection) url.openConnection(); + httpsURLConnection.setInstanceFollowRedirects(false); + httpsURLConnection.connect(); + + // certain that test certificate anchors to trusted CA for VALID certificate + // if the connection is successful + Certificate[] chain = httpsURLConnection.getServerCertificates(); + httpsURLConnection.disconnect(); + validateAnchor(chain); + } catch (SSLHandshakeException e) { + System.out.println("SSLHandshakeException: " + e.getMessage()); + Throwable cause = e.getCause(); + + while (cause != null) { + if (cause instanceof CertPathValidatorException) { + CertPathValidatorException cpve =(CertPathValidatorException)cause; + if (cpve.getReason() == CertPathValidatorException.BasicReason.REVOKED + || cpve.getCause() instanceof CertificateRevokedException) { + System.out.println("Certificate is revoked"); + + // We can validate anchor for revoked certificates as well + Certificate[] chain = cpve.getCertPath().getCertificates().toArray(new Certificate[0]); + validateAnchor(chain); + + if (revokedCert) { + return true; + } + } else if (cpve.getReason() == CertPathValidatorException.BasicReason.EXPIRED + || cpve.getCause() instanceof CertificateExpiredException) { + System.out.println("Certificate is expired"); + throw new SkippedException("Certificate is expired, skip the test"); + } + break; + } + cause = cause.getCause(); + } + + throw new RuntimeException("Unhandled exception", e); + } catch (SSLException e) { + // thrown if root CA is not included in cacerts + throw new RuntimeException(e); + } catch (IOException e) { + throw new SkippedException("Network setup issue, skip this test", e); + } finally { + if (httpsURLConnection != null) { + httpsURLConnection.disconnect(); + } + } + + return !revokedCert; + } + + private void validateAnchor(Certificate[] chain) throws Exception { + X509Certificate interCert = null; + + // fail if there is no intermediate CA or self-signed + if (chain.length < 2) { + throw new RuntimeException("Cert chain too short " + chain.length); + } else { + System.out.println("Finding intermediate certificate issued by CA"); + for (Certificate cert : chain) { + if (cert instanceof X509Certificate) { + X509Certificate certificate = (X509Certificate)cert; + System.out.println("Checking: " + certificate.getSubjectX500Principal()); + System.out.println("Issuer: " + certificate.getIssuerX500Principal()); + if (certificate.getIssuerX500Principal().equals(rootPrincipal)) { + interCert = certificate; + break; + } + } + } + } + + if (interCert == null) { + throw new RuntimeException("Intermediate Root CA not found in the chain"); + } + + // validate intermediate CA signed by root CA under test + System.out.println("Found intermediate root CA: " + interCert.getSubjectX500Principal()); + System.out.println("intermediate CA Issuer: " + interCert.getIssuerX500Principal()); + interCert.verify(rootCertificate.getPublicKey()); + System.out.println("Verified: Intermediate CA signed by test root CA"); + } + + private static class CustomHostnameVerifier implements HostnameVerifier { + @Override + public boolean verify(String hostname, SSLSession session) { + // Allow any hostname + return true; + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/CustomLauncherTest.java openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/CustomLauncherTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/CustomLauncherTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/CustomLauncherTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -21,22 +21,16 @@ * questions. */ -import java.io.File; -import java.io.IOException; -import java.nio.file.FileSystem; -import java.nio.file.FileSystems; +import jdk.test.lib.Utils; +import jdk.test.lib.Platform; +import jdk.test.lib.process.ProcessTools; + import java.nio.file.Files; -import java.nio.file.LinkOption; import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.nio.file.attribute.PosixFilePermission; -import java.util.HashSet; -import java.util.Set; +import java.nio.file.Paths; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import jdk.test.lib.process.ProcessTools; - /** * @test * @bug 6434402 8004926 @@ -47,80 +41,35 @@ * jdk.attach * jdk.management.agent/jdk.internal.agent * + * @requires (os.family == "linux" | os.family == "solaris") * @build TestManager TestApplication CustomLauncherTest - * @run main/othervm CustomLauncherTest + * @run main/othervm/native CustomLauncherTest */ public class CustomLauncherTest { - private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); - private static final String TEST_JDK = System.getProperty("test.jdk"); - private static final String WORK_DIR = System.getProperty("user.dir"); - - private static final String TEST_SRC = System.getProperty("test.src"); - private static final String OSNAME = System.getProperty("os.name"); - private static final String ARCH; - static { - // magic with os.arch - String osarch = System.getProperty("os.arch"); - switch (osarch) { - case "i386": - case "i486": - case "i586": - case "i686": - case "i786": - case "i886": - case "i986": { - ARCH = "i586"; - break; - } - case "x86_64": - case "amd64": { - ARCH = "amd64"; - break; - } - case "sparc": - ARCH = "sparcv9"; - break; - default: { - ARCH = osarch; - } - } - } + + public static final String TEST_NATIVE_PATH = System.getProperty("test.nativepath"); public static void main(String[] args) throws Exception { - if (TEST_CLASSPATH == null || TEST_CLASSPATH.isEmpty()) { + if (".".equals(Utils.TEST_CLASS_PATH)) { System.out.println("Test is designed to be run from jtreg only"); return; } - if (getPlatform() == null) { - System.out.println("Test not designed to run on this operating " + - "system (" + OSNAME + "), skipping..."); - return; - } - - final FileSystem FS = FileSystems.getDefault(); - - Path libjvmPath = findLibjvm(FS); - if (libjvmPath == null) { - throw new Error("Unable to locate 'libjvm.so' in " + TEST_JDK); - } - + Path libjvm = Platform.jvmLibDir().resolve("libjvm.so"); Process serverPrc = null, clientPrc = null; try { - String[] launcher = getLauncher(); - - if (launcher == null) return; // launcher not available for the tested platform; skip + String launcher = getLauncher(); System.out.println("Starting custom launcher:"); System.out.println("========================="); - System.out.println(" launcher : " + launcher[0]); - System.out.println(" libjvm : " + libjvmPath.toString()); - System.out.println(" classpath : " + TEST_CLASSPATH); + System.out.println(" launcher : " + launcher); + System.out.println(" libjvm : " + libjvm); + System.out.println(" classpath : " + Utils.TEST_CLASS_PATH); ProcessBuilder server = new ProcessBuilder( - launcher[1], - libjvmPath.toString(), - TEST_CLASSPATH, + launcher, + libjvm.toString(), + Utils.TEST_CLASS_PATH, "TestApplication" ); @@ -148,7 +97,7 @@ ProcessBuilder client = ProcessTools.createJavaProcessBuilder( "-cp", - TEST_CLASSPATH, + Utils.TEST_CLASS_PATH, "--add-exports", "jdk.management.agent/jdk.internal.agent=ALL-UNNAMED", "TestManager", String.valueOf(serverPrc.pid()), @@ -182,87 +131,8 @@ } } - private static Path findLibjvm(FileSystem FS) { - Path libjvmPath = findLibjvm(FS.getPath(TEST_JDK, "lib")); - return libjvmPath; - } - - private static Path findLibjvm(Path libPath) { - // libjvm.so -> server/libjvm.so -> client/libjvm.so - Path libjvmPath = libPath.resolve("libjvm.so"); - if (isFileOk(libjvmPath)) { - return libjvmPath; - } - libjvmPath = libPath.resolve("server/libjvm.so"); - if (isFileOk(libjvmPath)) { - return libjvmPath; - } - libjvmPath = libPath.resolve("client/libjvm.so"); - if (isFileOk(libPath)) { - return libjvmPath; - } - - return null; - } - - private static boolean isFileOk(Path path) { - return Files.isRegularFile(path) && Files.isReadable(path); - } - - private static String getPlatform() { - String platform = null; - switch (OSNAME.toLowerCase()) { - case "linux": { - platform = "linux"; - break; - } - case "sunos": { - platform = "solaris"; - break; - } - default: { - platform = null; - } - } - - return platform; - } - - private static String[] getLauncher() throws IOException { - String platform = getPlatform(); - if (platform == null) { - return null; - } - - String launcher = TEST_SRC + File.separator + platform + "-" + ARCH + - File.separator + "launcher"; - - final FileSystem FS = FileSystems.getDefault(); - Path launcherPath = FS.getPath(launcher); - - final boolean hasLauncher = Files.isRegularFile(launcherPath, LinkOption.NOFOLLOW_LINKS)&& - Files.isReadable(launcherPath); - if (!hasLauncher) { - System.out.println("Launcher [" + launcher + "] does not exist. Skipping the test."); - return null; - } - - // It is impossible to store an executable file in the source control - // We need to copy the launcher to the working directory - // and set the executable flag - Path localLauncherPath = FS.getPath(WORK_DIR, "launcher"); - Files.copy(launcherPath, localLauncherPath, - StandardCopyOption.REPLACE_EXISTING); - if (!Files.isExecutable(localLauncherPath)) { - Set perms = new HashSet<>( - Files.getPosixFilePermissions( - localLauncherPath, - LinkOption.NOFOLLOW_LINKS - ) - ); - perms.add(PosixFilePermission.OWNER_EXECUTE); - Files.setPosixFilePermissions(localLauncherPath, perms); - } - return new String[] {launcher, localLauncherPath.toAbsolutePath().toString()}; + private static String getLauncher() { + Path launcherPath = Paths.get(TEST_NATIVE_PATH, "launcher"); + return launcherPath.toAbsolutePath().toString(); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/Makefile openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/Makefile --- openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/Makefile 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -# Copyright (c) 2006, 2007, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. - -# -# This Makefile is used to generate versions of the launcher program for -# use by the CustomLauncherTest. The binaries are checked into SCCS -# so this Makefile is not used as part of test run. It is provided to -# make rebuilding the launcher binaries a relatively painless activity. -# - -# -# Edit the following to reflect the current build environment. -# -# Architecture being built (initially one of: solaris-sparc, solaris-i586, -# linux-i586. -# -PLATFORM=solaris -ARCH=sparc -OUTPUT_DIR =$(PLATFORM)-$(ARCH) - -# -# Path to C compiler -# -# As of 6/1/06: -# Solaris CC=/java/devtools/$(ARCH)/SUNWspro/SS11/bin/cc -# Linux CC=/usr/bin/gcc -# -CC=/java/devtools/$(ARCH)/SUNWspro/SS11/bin/cc - -# -# Include directory in JRE or JDK install -# -JINCLUDE=/java/re/jdk/1.6.0/latest/binaries/$(OUTPUT_DIR)/include - -# -# PLATFORM dependent flags -# -# On pre-Solaris 10, -lthread is required. -# -ifeq ($(PLATFORM), solaris) - PLATFORM_LIBS= -lthread -else - PLATFORM_LIBS= -endif - -# -# Targets -# -all: install - -$(PLATFORM): - mkdir $(OUTPUT_DIR) $(OUTPUT_DIR)/SCCS - -install: $(PLATFORM) - $(CC) -I$(JINCLUDE) -I$(JINCLUDE)/$(PLATFORM) \ - -o $(OUTPUT_DIR)/launcher launcher.c $(PLATFORM_LIBS) -ldl - -clean: - - -clobber: clean - rm $(OUTPUT_DIR)/launcher diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/exelauncher.c openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/exelauncher.c --- openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/exelauncher.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/exelauncher.c 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * A miniature launcher for use by CustomLauncherTest.java test. It sets + * up the absolute minimal execution environment. + */ +#include +#include +#include + +#include "jni.h" + +typedef jint (*create_vm_func)(JavaVM **, void**, void*); + +void *JNU_FindCreateJavaVM(char *vmlibpath) { + void *libVM = dlopen(vmlibpath, RTLD_LAZY); + if (libVM == NULL) { + return NULL; + } + return dlsym(libVM, "JNI_CreateJavaVM"); +} + +#define CP_PROP "-Djava.class.path=" + +int main(int argc, char**argv) { + JNIEnv *env; + JavaVM *jvm; + jint res; + jclass cls; + jmethodID mid; + jstring jstr; + jclass stringClass; + jobjectArray args; + create_vm_func create_vm; + JavaVMInitArgs vm_args; + char* cp_prop; + JavaVMOption options[1]; + + if (argc < 4) { + fprintf(stderr, "Usage: %s jvm-path classpath class\n", argv[0]); + return -1; + } + cp_prop = (char*)malloc(strlen(CP_PROP)+strlen(argv[2]) +1); + sprintf(cp_prop, "%s%s", CP_PROP, argv[2]); + + options[0].optionString = cp_prop; + vm_args.version = 0x00010002; + vm_args.options = options; + vm_args.nOptions = 1; + vm_args.ignoreUnrecognized = JNI_TRUE; + + create_vm = (create_vm_func)JNU_FindCreateJavaVM(argv[1]); + if (create_vm == NULL) { + fprintf(stderr, "can't get address of JNI_CreateJavaVM\n"); + return -1; + } + + res = (*create_vm)(&jvm, (void**)&env, &vm_args); + if (res < 0) { + fprintf(stderr, "Can't create Java VM\n"); + return -1; + } + cls = (*env)->FindClass(env, argv[3]); + if (cls == NULL) { + goto destroy; + } + + mid = (*env)->GetStaticMethodID(env, cls, "main", + "([Ljava/lang/String;)V"); + if (mid == NULL) { + goto destroy; + } + jstr = (*env)->NewStringUTF(env, " from C!"); + if (jstr == NULL) { + goto destroy; + } + stringClass = (*env)->FindClass(env, "java/lang/String"); + args = (*env)->NewObjectArray(env, 1, stringClass, jstr); + if (args == NULL) { + goto destroy; + } + (*env)->CallStaticVoidMethod(env, cls, mid, args); + + destroy: + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionDescribe(env); + } + (*jvm)->DestroyJavaVM(jvm); + + return 0; + } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/launcher.c openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/launcher.c --- openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/launcher.c 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/launcher.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2006, 2007, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * A minature launcher for use by CustomLauncherTest.sh. It sets - * up the absolute minimal execution environment. - */ -#include -#include -#include - -#include "jni.h" - -typedef jint (*create_vm_func)(JavaVM **, void**, void*); - -void *JNU_FindCreateJavaVM(char *vmlibpath) { - void *libVM = dlopen(vmlibpath, RTLD_LAZY); - if (libVM == NULL) { - return NULL; - } - return dlsym(libVM, "JNI_CreateJavaVM"); -} - -#define CP_PROP "-Djava.class.path=" - -int main(int argc, char**argv) { - JNIEnv *env; - JavaVM *jvm; - jint res; - jclass cls; - jmethodID mid; - jstring jstr; - jclass stringClass; - jobjectArray args; - create_vm_func create_vm; - JavaVMInitArgs vm_args; - char* cp_prop; - JavaVMOption options[1]; - - if (argc < 4) { - fprintf(stderr, "Usage: %s jvm-path classpath class\n", argv[0]); - return -1; - } - cp_prop = (char*)malloc(strlen(CP_PROP)+strlen(argv[2]) +1); - sprintf(cp_prop, "%s%s", CP_PROP, argv[2]); - - options[0].optionString = cp_prop; - vm_args.version = 0x00010002; - vm_args.options = options; - vm_args.nOptions = 1; - vm_args.ignoreUnrecognized = JNI_TRUE; - - create_vm = (create_vm_func)JNU_FindCreateJavaVM(argv[1]); - if (create_vm == NULL) { - fprintf(stderr, "can't get address of JNI_CreateJavaVM\n"); - return -1; - } - - res = (*create_vm)(&jvm, (void**)&env, &vm_args); - if (res < 0) { - fprintf(stderr, "Can't create Java VM\n"); - return -1; - } - cls = (*env)->FindClass(env, argv[3]); - if (cls == NULL) { - goto destroy; - } - - mid = (*env)->GetStaticMethodID(env, cls, "main", - "([Ljava/lang/String;)V"); - if (mid == NULL) { - goto destroy; - } - jstr = (*env)->NewStringUTF(env, " from C!"); - if (jstr == NULL) { - goto destroy; - } - stringClass = (*env)->FindClass(env, "java/lang/String"); - args = (*env)->NewObjectArray(env, 1, stringClass, jstr); - if (args == NULL) { - goto destroy; - } - (*env)->CallStaticVoidMethod(env, cls, mid, args); - - destroy: - if ((*env)->ExceptionOccurred(env)) { - (*env)->ExceptionDescribe(env); - } - (*jvm)->DestroyJavaVM(jvm); - - return 0; - } Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/linux-amd64/launcher and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/linux-amd64/launcher differ Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/linux-i586/launcher and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/linux-i586/launcher differ Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/solaris-amd64/launcher and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/solaris-amd64/launcher differ Binary files /tmp/tmpc4nxmzfk/NbgHpfOy7K/openjdk-lts-11.0.21+9/test/jdk/sun/management/jmxremote/bootstrap/solaris-sparcv9/launcher and /tmp/tmpc4nxmzfk/Rrc7mpoYx5/openjdk-lts-11.0.22+7/test/jdk/sun/management/jmxremote/bootstrap/solaris-sparcv9/launcher differ diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java openjdk-lts-11.0.22+7/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -33,98 +33,126 @@ import java.io.FileWriter; import java.io.PrintWriter; import java.io.BufferedWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; public class DefaultCaching { public static void main(String args[]) throws Exception { - String hostsFileName = System.getProperty("test.src", ".") + "/DefaultCachingHosts"; + String hostsFileNameSrc = System.getProperty("test.src", ".") + "/DefaultCachingHosts"; + String hostsFileName = System.getProperty("user.dir", ".") + "/DefaultCachingHosts"; + if (!hostsFileNameSrc.equals(hostsFileName)) { + Files.copy(Path.of(hostsFileNameSrc), Path.of(hostsFileName), REPLACE_EXISTING); + System.out.println("Host file created: " + hostsFileName); + } System.setProperty("jdk.net.hosts.file", hostsFileName); // initial mapping // name service needs to resolve this. addMappingToHostsFile("theclub", "129.156.220.219", hostsFileName, false); - test ("theclub", "129.156.220.219", true); // lk: 1 - test ("luster", "1.16.20.2", false); // lk: 2 + test("theclub", "129.156.220.219", true); // lk: 1 + test("luster", "1.16.20.2", false); // lk: 2 // name service now needs to know about luster addMappingToHostsFile("luster", "10.5.18.21", hostsFileName, true); - test ("luster", "1.16.20.2", false); // lk: 2 - sleep (10+1); + test("luster", "1.16.20.2", false); // lk: 2 + sleep(10+1); test("luster", "10.5.18.21", true, 3); // lk: 3 - sleep (5); + sleep(5); // new mapping for theclub and rewrite existing foo and luster mappings addMappingToHostsFile("theclub", "129.156.220.1", hostsFileName, false); addMappingToHostsFile("foo", "10.5.18.22", hostsFileName, true); addMappingToHostsFile("luster", "10.5.18.21", hostsFileName, true); - test ("theclub", "129.156.220.219", true, 3); - test ("luster", "10.5.18.21", true, 3); - test ("bar", "10.5.18.22", false, 4); - test ("foo", "10.5.18.22", true, 5); + test("theclub", "129.156.220.219", true, 3); + test("luster", "10.5.18.21", true, 3); + test("bar", "10.5.18.22", false, 4); + test("foo", "10.5.18.22", true, 5); // now delay to see if theclub has expired - sleep (5); + sleep(5); - test ("foo", "10.5.18.22", true, 5); - test ("theclub", "129.156.220.1", true, 6); + test("foo", "10.5.18.22", true, 5); + test("theclub", "129.156.220.1", true, 6); - sleep (11); + sleep(11); // now see if luster has expired - test ("luster", "10.5.18.21", true, 7); - test ("theclub", "129.156.220.1", true, 7); + test("luster", "10.5.18.21", true, 7); + test("theclub", "129.156.220.1", true, 7); // now delay to see if 3rd has expired - sleep (10+6); + sleep(10+6); - test ("theclub", "129.156.220.1", true, 8); - test ("luster", "10.5.18.21", true, 8); - test ("foo", "10.5.18.22", true, 9); + test("theclub", "129.156.220.1", true, 8); + test("luster", "10.5.18.21", true, 8); + test("foo", "10.5.18.22", true, 9); } /* throws RuntimeException if it fails */ - static void test (String host, String address, - boolean shouldSucceed, int count) { - test (host, address, shouldSucceed); + static void test(String host, String address, + boolean shouldSucceed, int count) { + test(host, address, shouldSucceed); } - static void sleep (int seconds) { + static void sleep(int seconds) { try { - Thread.sleep (seconds * 1000); - } catch (InterruptedException e) {} + sleepms(seconds * 1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + static long sleepms(long millis) throws InterruptedException { + long start = System.nanoTime(); + long ms = millis; + while (ms > 0) { + assert ms < Long.MAX_VALUE/1000_000L; + Thread.sleep(ms); + long elapsedms = (System.nanoTime() - start)/1000_000L; + ms = millis - elapsedms; + } + return millis - ms; } - static void test (String host, String address, boolean shouldSucceed) { + static void test(String host, String address, boolean shouldSucceed) { InetAddress addr = null; try { - addr = InetAddress.getByName (host); + addr = InetAddress.getByName(host); if (!shouldSucceed) { - throw new RuntimeException (host+":"+address+": should fail"); - + throw new RuntimeException(host+":"+address+": should fail (got " + + addr + ")"); } if (!address.equals(addr.getHostAddress())) { - throw new RuntimeException(host+":"+address+": compare failed"); + throw new RuntimeException(host+"/"+address+": compare failed (found " + + addr + ")"); } + System.out.println("test: " + host + "/" + address + + " succeeded - got " + addr); } catch (UnknownHostException e) { if (shouldSucceed) { throw new RuntimeException(host+":"+address+": should succeed"); + } else { + System.out.println("test: " + host + "/" + address + + " succeeded - got expected " + e); } } } - private static void addMappingToHostsFile (String host, - String addr, - String hostsFileName, - boolean append) + private static void addMappingToHostsFile(String host, + String addr, + String hostsFileName, + boolean append) throws Exception { String mapping = addr + " " + host; try (PrintWriter hfPWriter = new PrintWriter(new BufferedWriter( new FileWriter(hostsFileName, append)))) { hfPWriter.println(mapping); -} + } } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/ftp/TestFtpClientNameListWithNull.java openjdk-lts-11.0.22+7/test/jdk/sun/net/ftp/TestFtpClientNameListWithNull.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/ftp/TestFtpClientNameListWithNull.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/ftp/TestFtpClientNameListWithNull.java 2024-01-09 21:19:49.000000000 +0000 @@ -37,6 +37,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; @@ -52,7 +53,8 @@ FtpClient client = FtpClient.create()) { (new Thread(server)).start(); int port = server.getPort(); - client.connect(new InetSocketAddress("localhost", port)); + InetAddress loopback = InetAddress.getLoopbackAddress(); + client.connect(new InetSocketAddress(loopback, port)); client.nameList(null); } finally { if (commandHasArgs) { @@ -66,7 +68,9 @@ private final ServerSocket serverSocket; FtpServer() throws IOException { - serverSocket = new ServerSocket(0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress(loopback, 0)); } public void handleClient(Socket client) throws IOException { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/AuthHeaderTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/AuthHeaderTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/AuthHeaderTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/AuthHeaderTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -85,7 +85,7 @@ static void client (String u) throws Exception { URL url = new URL (u); System.out.println ("client opening connection to: " + u); - URLConnection urlc = url.openConnection (); + URLConnection urlc = url.openConnection (Proxy.NO_PROXY); InputStream is = urlc.getInputStream (); read (is); is.close(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/CookieHttpClientTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/CookieHttpClientTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/CookieHttpClientTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/CookieHttpClientTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 7129083 + * @library /test/lib * @summary Cookiemanager does not store cookies if url is read * before setting cookiemanager */ @@ -31,12 +32,16 @@ import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.URL; import java.io.InputStream; import java.io.IOException; +import jdk.test.lib.net.URIBuilder; + public class CookieHttpClientTest implements Runnable { final ServerSocket ss; static final int TIMEOUT = 10 * 1000; @@ -85,10 +90,15 @@ CookieHttpClientTest() throws Exception { /* start the server */ - ss = new ServerSocket(0); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); (new Thread(this)).start(); - URL url = new URL("http://localhost:" + ss.getLocalPort() +"/"); + URL url = URIBuilder.newBuilder() + .scheme("http") + .loopback() + .port(ss.getLocalPort()) + .path("/").toURL(); // Run without a CookieHandler first InputStream in = url.openConnection().getInputStream(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/ProxyTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/ProxyTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/ProxyTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/ProxyTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -126,7 +126,9 @@ } public HttpProxyServer() throws IOException { - server = new ServerSocket(0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + server = new ServerSocket(); + server.bind(new InetSocketAddress(loopback, 0)); } public int getPort() { @@ -183,7 +185,8 @@ server.start(); int port = server.getPort(); - Proxy ftpProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", port)); + InetAddress loopback = InetAddress.getLoopbackAddress(); + Proxy ftpProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(loopback, port)); URL url = new URL(testURL); InputStream ins = (url.openConnection(ftpProxy)).getInputStream(); in = new BufferedReader(new InputStreamReader(ins)); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/RetryPost.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/RetryPost.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpClient/RetryPost.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpClient/RetryPost.java 2024-01-09 21:19:49.000000000 +0000 @@ -84,13 +84,17 @@ throw new RuntimeException("Failed: POST request being retried"); } catch (SocketException se) { + System.out.println("Got expected exception: " + se); // this is what we expect to happen and is OK. - if (shouldRetry && httpHandler.getCallCount() != 2) + if (shouldRetry && httpHandler.getCallCount() != 2) { + se.printStackTrace(System.out); throw new RuntimeException("Failed: Handler should have been called twice. " + "It was called "+ httpHandler.getCallCount() + " times"); - else if (!shouldRetry && httpHandler.getCallCount() != 1) + } else if (!shouldRetry && httpHandler.getCallCount() != 1) { + se.printStackTrace(System.out); throw new RuntimeException("Failed: Handler should have only been called once" + "It was called "+ httpHandler.getCallCount() + " times"); + } } finally { httpServer.stop(1); executorService.shutdown(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.Authenticator; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.PasswordAuthentication; import java.net.URL; @@ -62,8 +63,8 @@ // set authenticator Authenticator.setDefault(new AuthenticatorImpl()); - String url = String.format("http://localhost:%d/test/", - server.getPort()); + String url = String.format("http://%s/test/", + server.getAuthority()); // load a document which is protected with NTML authentication System.out.println("load() called: " + url); @@ -107,8 +108,9 @@ } static LocalHttpServer startServer() throws IOException { + InetAddress loopback = InetAddress.getLoopbackAddress(); HttpServer httpServer = HttpServer.create( - new InetSocketAddress(0), 0); + new InetSocketAddress(loopback, 0), 0); LocalHttpServer localHttpServer = new LocalHttpServer(httpServer); localHttpServer.start(); @@ -126,6 +128,14 @@ System.out.println("HttpServer: stopped"); } + String getAuthority() { + InetAddress address = server.getAddress().getAddress(); + String hostaddr = address.isAnyLocalAddress() + ? "localhost" : address.getHostAddress(); + if (hostaddr.indexOf(':') > -1) hostaddr = "[" + hostaddr + "]"; + return hostaddr + ":" + getPort(); + } + int getPort() { return server.getAddress().getPort(); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpURLConnection/PostOnDelete.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpURLConnection/PostOnDelete.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/HttpURLConnection/PostOnDelete.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/HttpURLConnection/PostOnDelete.java 2024-01-09 21:19:49.000000000 +0000 @@ -83,9 +83,10 @@ } public String getAuthority() { - String address = server.getAddress().getHostString(); - address = (address.indexOf(':') >= 0) ? ("[" + address + "]") : address; - return address + ":" + getPort(); + InetAddress address = server.getAddress().getAddress(); + String hostaddr = address.isAnyLocalAddress() ? "localhost" : address.getHostAddress(); + hostaddr = (hostaddr.indexOf(':') >= 0) ? ("[" + hostaddr + "]") : hostaddr; + return hostaddr + ":" + getPort(); } public int getPort() { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, 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 @@ -62,7 +62,7 @@ public static void startHttpServer() { try { httpTrans = new SimpleHttpTransaction(); - server = new TestHttpServer(httpTrans, 1, 10, 0); + server = new TestHttpServer(httpTrans, 1, 10, InetAddress.getLocalHost(), 0); } catch (IOException e) { e.printStackTrace(); } @@ -71,13 +71,14 @@ public static void clientHttpCalls() { try { System.out.println("http server listen on: " + server.getLocalPort()); - String baseURLStr = "http://" + InetAddress.getLocalHost().getHostAddress() + ":" + - server.getLocalPort() + "/"; + String hostAddr = InetAddress.getLocalHost().getHostAddress(); + if (hostAddr.indexOf(':') > -1) hostAddr = "[" + hostAddr + "]"; + String baseURLStr = "http://" + hostAddr + ":" + server.getLocalPort() + "/"; URL bigDataURL = new URL (baseURLStr + "firstCall"); URL smallDataURL = new URL (baseURLStr + "secondCall"); - HttpURLConnection uc = (HttpURLConnection)bigDataURL.openConnection(); + HttpURLConnection uc = (HttpURLConnection)bigDataURL.openConnection(Proxy.NO_PROXY); //Only read 1 byte of response data and close the stream InputStream is = uc.getInputStream(); @@ -88,7 +89,7 @@ // Allow the KeepAliveStreamCleaner thread to read the data left behind and cache the connection. try { Thread.sleep(2000); } catch (Exception e) {} - uc = (HttpURLConnection)smallDataURL.openConnection(); + uc = (HttpURLConnection)smallDataURL.openConnection(Proxy.NO_PROXY); uc.getResponseCode(); if (SimpleHttpTransaction.failed) @@ -96,7 +97,7 @@ // Part 2 URL part2Url = new URL (baseURLStr + "part2"); - uc = (HttpURLConnection)part2Url.openConnection(); + uc = (HttpURLConnection)part2Url.openConnection(Proxy.NO_PROXY); is = uc.getInputStream(); is.close(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 @@ -26,6 +26,8 @@ * @library /test/lib * @bug 4701299 * @summary Keep-Alive-Timer thread management in KeepAliveCache causes memory leak + * @run main KeepAliveTimerThread + * @run main/othervm -Djava.net.preferIPv6Addresses=true KeepAliveTimerThread */ import java.net.*; @@ -103,8 +105,10 @@ public static void main(String args[]) throws Exception { - ServerSocket ss = new ServerSocket(0); - Server s = new Server (ss); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ServerSocket ss = new ServerSocket(); + ss.bind(new InetSocketAddress(loopback, 0)); + Server s = new Server(ss); s.start(); URL url = URIBuilder.newBuilder() diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveStream/InfiniteLoop.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveStream/InfiniteLoop.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveStream/InfiniteLoop.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveStream/InfiniteLoop.java 2024-01-09 21:19:49.000000000 +0000 @@ -26,6 +26,9 @@ * @bug 8004863 * @modules jdk.httpserver * @summary Checks for proper close code in KeepAliveStream + * @library /test/lib + * @run main InfiniteLoop + * @run main/othervm -Djava.net.preferIPv6Addresses=true InfiniteLoop */ import com.sun.net.httpserver.HttpExchange; @@ -35,10 +38,14 @@ import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; +import java.net.InetAddress; import java.net.InetSocketAddress; +import java.net.Proxy; import java.net.URL; import java.util.concurrent.Phaser; +import jdk.test.lib.net.URIBuilder; + // Racey test, will not always fail, but if it does then we have a problem. public class InfiniteLoop { @@ -49,11 +56,16 @@ server.start(); try { InetSocketAddress address = server.getAddress(); - URL url = new URL("http://localhost:" + address.getPort() - + "/test/InfiniteLoop"); + URL url = URIBuilder.newBuilder() + .scheme("http") + .host(server.getAddress().getAddress()) + .port(server.getAddress().getPort()) + .path("/test/InfiniteLoop") + .toURL(); final Phaser phaser = new Phaser(2); for (int i=0; i<10; i++) { - HttpURLConnection uc = (HttpURLConnection)url.openConnection(); + HttpURLConnection uc = (HttpURLConnection) + url.openConnection(Proxy.NO_PROXY); final InputStream is = uc.getInputStream(); final Thread thread = new Thread() { public void run() { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamClose.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamClose.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamClose.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamClose.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, 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 @@ -25,11 +25,13 @@ * @test * @bug 4392195 * @summary Infinite loop in sun.net.www.http.KeepAliveStream [due to skip()] + * @library /test/lib * @run main/othervm/timeout=30 KeepAliveStreamClose */ import java.net.*; import java.io.*; +import jdk.test.lib.net.URIBuilder; public class KeepAliveStreamClose { static class XServer extends Thread { @@ -78,11 +80,16 @@ public static void main (String[] args) { try { - ServerSocket serversocket = new ServerSocket (0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ServerSocket serversocket = new ServerSocket (0, 50, loopback); int port = serversocket.getLocalPort (); XServer server = new XServer (serversocket); server.start (); - URL url = new URL ("http://localhost:"+port); + URL url = URIBuilder.newBuilder() + .scheme("http") + .loopback() + .port(port) + .toURL(); URLConnection urlc = url.openConnection (); InputStream is = urlc.getInputStream (); int i=0, c; diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/AsyncDisconnect.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/AsyncDisconnect.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/AsyncDisconnect.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/AsyncDisconnect.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -24,18 +24,21 @@ /* * @test * @bug 6358532 + * @library /test/lib * @modules jdk.httpserver * @run main/othervm AsyncDisconnect + * @run main/othervm -Djava.net.preferIPv6Addresses=true AsyncDisconnect * @summary HttpURLConnection.disconnect doesn't really do the job */ import java.net.*; -import java.util.*; import java.io.*; import com.sun.net.httpserver.*; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; +import jdk.test.lib.net.URIBuilder; + public class AsyncDisconnect implements Runnable { com.sun.net.httpserver.HttpServer httpServer; @@ -43,27 +46,30 @@ ExecutorService executorService; HttpURLConnection uc; - public static void main(String[] args) { + public static void main(String[] args) throws Exception { new AsyncDisconnect(); } - public AsyncDisconnect() { - try { - startHttpServer(); - doClient(); - } catch (IOException ioe) { - System.err.println(ioe); - } + public AsyncDisconnect() throws Exception { + startHttpServer(); + doClient(); } - void doClient() { + void doClient() throws Exception { + Thread t = new Thread(this); + try { InetSocketAddress address = httpServer.getAddress(); - URL url = new URL("http://" + address.getHostName() + ":" + address.getPort() + "/test/"); - uc = (HttpURLConnection)url.openConnection(); + URL url = URIBuilder.newBuilder() + .scheme("http") + .host(address.getAddress()) + .port(address.getPort()) + .path("/test/") + .toURL(); + uc = (HttpURLConnection) url.openConnection(Proxy.NO_PROXY); // create a thread that will disconnect the connection - (new Thread(this)).start(); + t.start(); uc.getInputStream(); @@ -73,11 +79,11 @@ } catch (SocketException se) { // this is what we expect to happen and is OK. //System.out.println(se); - } catch (IOException e) { - e.printStackTrace(); } finally { httpServer.stop(1); + t.join(); executorService.shutdown(); + } } @@ -93,7 +99,9 @@ * Http Server */ public void startHttpServer() throws IOException { - httpServer = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(0), 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, 0); + httpServer = com.sun.net.httpserver.HttpServer.create(address, 0); httpHandler = new MyHandler(); HttpContext ctx = httpServer.createContext("/test/", httpHandler); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6369510.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6369510.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6369510.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6369510.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2019, 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 @@ -59,11 +59,12 @@ void doClient() { try { InetSocketAddress address = httpServer.getAddress(); - String urlString = "http://" + InetAddress.getLocalHost().getHostName() + ":" + address.getPort() + "/test/"; + String urlString = "http://" + InetAddress.getLocalHost().getHostName() + + ":" + address.getPort() + "/test/"; System.out.println("URL == " + urlString); // GET Request - URL url = new URL("http://" + InetAddress.getLocalHost().getHostName() + ":" + address.getPort() + "/test/"); + URL url = new URL(urlString); HttpURLConnection uc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); int resp = uc.getResponseCode(); if (resp != 200) @@ -95,7 +96,8 @@ * Http Server */ public void startHttpServer() throws IOException { - httpServer = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(0), 0); + InetAddress localhost = InetAddress.getLocalHost(); + httpServer = HttpServer.create(new InetSocketAddress(localhost, 0), 0); // create HttpServer context HttpContext ctx = httpServer.createContext("/test/", new MyHandler()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6641309.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6641309.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6641309.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6641309.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2019, 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 @@ -25,7 +25,10 @@ * @test * @bug 6641309 * @modules jdk.httpserver - * @summary Wrong Cookie separator used in HttpURLConnection + * @library /test/lib + * @run main/othervm B6641309 + * @run main/othervm -Djava.net.preferIPv6Addresses=true B6641309 + * @summary Wrong Cookie separator used in HttpURLConnection B6641309 */ import java.net.*; @@ -35,65 +38,65 @@ import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; +import jdk.test.lib.net.URIBuilder; + public class B6641309 { com.sun.net.httpserver.HttpServer httpServer; ExecutorService executorService; - public static void main(String[] args) - { + public static void main(String[] args) throws Exception { new B6641309(); } - public B6641309() - { - try { - startHttpServer(); - doClient(); - } catch (IOException ioe) { - System.err.println(ioe); - } + public B6641309() throws Exception { + startHttpServer(); + doClient(); } - void doClient() { + void doClient() throws Exception { CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL)); - try { - InetSocketAddress address = httpServer.getAddress(); + ProxySelector.setDefault(ProxySelector.of(null)); - // GET Request - URL url = new URL("http://localhost:" + address.getPort() + "/test/"); - CookieHandler ch = CookieHandler.getDefault(); - Map> header = new HashMap>(); - List values = new LinkedList(); - values.add("Test1Cookie=TEST1; path=/test/"); - values.add("Test2Cookie=TEST2; path=/test/"); - header.put("Set-Cookie", values); - - // preload the CookieHandler with a cookie for our URL - // so that it will be sent during the first request - ch.put(url.toURI(), header); - HttpURLConnection uc = (HttpURLConnection)url.openConnection(); - int resp = uc.getResponseCode(); - if (resp != 200) - throw new RuntimeException("Failed: Response code from GET is not 200"); - - System.out.println("Response code from GET = 200 OK"); - - } catch (IOException e) { - e.printStackTrace(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } finally { - httpServer.stop(1); - executorService.shutdown(); + InetSocketAddress address = httpServer.getAddress(); + + // GET Request + URL url = URIBuilder.newBuilder() + .scheme("http") + .host(address.getAddress()) + .port(address.getPort()) + .path("/test/") + .toURL(); + + CookieHandler ch = CookieHandler.getDefault(); + Map> header = new HashMap>(); + List values = new LinkedList(); + values.add("Test1Cookie=TEST1; path=/test/"); + values.add("Test2Cookie=TEST2; path=/test/"); + header.put("Set-Cookie", values); + + // preload the CookieHandler with a cookie for our URL + // so that it will be sent during the first request + ch.put(url.toURI(), header); + HttpURLConnection uc = (HttpURLConnection)url.openConnection(); + int resp = uc.getResponseCode(); + if (resp != 200) { + throw new RuntimeException("Failed: Response code from GET is not 200: " + + resp); } + System.out.println("Response code from GET = 200 OK"); + + httpServer.stop(1); + executorService.shutdown(); } /** * Http Server */ public void startHttpServer() throws IOException { - httpServer = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(0), 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, 0); + httpServer = com.sun.net.httpserver.HttpServer.create(address, 0); // create HttpServer context HttpContext ctx = httpServer.createContext("/test/", new MyHandler()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6660405.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6660405.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6660405.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6660405.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2019, 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 @@ -25,7 +25,10 @@ * @test * @bug 6660405 * @modules jdk.httpserver - * @summary HttpURLConnection returns the wrong InputStream + * @library /test/lib + * @run main/othervm B6660405 + * @run main/othervm -Djava.net.preferIPv6Addresses=true B6660405 + * @summary HttpURLConnection returns the wrong InputStream B6660405 */ import java.net.*; @@ -34,6 +37,8 @@ import com.sun.net.httpserver.*; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; +import jdk.test.lib.net.URIBuilder; + public class B6660405 { @@ -72,7 +77,8 @@ } @Override - public CacheResponse get(URI uri, String rqstMethod, Map> rqstHeaders) throws IOException + public CacheResponse get(URI uri, String rqstMethod, Map> rqstHeaders) + throws IOException { if (uri.getPath().equals("/redirect/index.html")) { return new MyCacheResponse(); @@ -88,53 +94,61 @@ } - public static void main(String[] args) + public static void main(String[] args) throws Exception { new B6660405(); } - public B6660405() - { - try { - startHttpServer(); - doClient(); - } catch (IOException ioe) { - System.err.println(ioe); - } + public B6660405() throws Exception { + startHttpServer(); + doClient(); } - void doClient() { + void doClient() throws Exception { ResponseCache.setDefault(new MyResponseCache()); - try { - InetSocketAddress address = httpServer.getAddress(); + InetSocketAddress address = httpServer.getAddress(); - // GET Request - URL url = new URL("http://localhost:" + address.getPort() + "/test/index.html"); - HttpURLConnection uc = (HttpURLConnection)url.openConnection(); - int code = uc.getResponseCode(); - System.err.println("response code = " + code); - int l = uc.getContentLength(); - System.err.println("content-length = " + l); - InputStream in = uc.getInputStream(); - int i = 0; - // Read till end of stream - do { - i = in.read(); - } while (i != -1); - in.close(); - } catch (IOException e) { - throw new RuntimeException("Got the wrong InputStream after checking headers"); - } finally { - httpServer.stop(1); - executorService.shutdown(); + // GET Request + URL url = URIBuilder.newBuilder() + .scheme("http") + .host(address.getAddress()) + .port(address.getPort()) + .path("/test/index.html") + .toURL(); + + HttpURLConnection uc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); + int code = uc.getResponseCode(); + System.err.println("response code = " + code); + int l = uc.getContentLength(); + System.err.println("content-length = " + l); + if (l != 1024) { + throw new AssertionError("Bad content length: " + l); + } + + InputStream in = uc.getInputStream(); + int i = 0; + // Read till end of stream + do { + l--; + i = in.read(); + } while (i != -1); + in.close(); + if (l != -1) { + throw new AssertionError("Only " + (1024 - (l + 1)) + + " bytes read from stream."); } + + httpServer.stop(1); + executorService.shutdown(); } /** * Http Server */ public void startHttpServer() throws IOException { - httpServer = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(0), 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback,0); + httpServer = com.sun.net.httpserver.HttpServer.create(address, 0); // create HttpServer context HttpContext ctx = httpServer.createContext("/test/", new MyHandler()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6890349.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6890349.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B6890349.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B6890349.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, 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 @@ -23,7 +23,9 @@ /** * @test * @bug 6890349 + * @library /test/lib * @run main/othervm B6890349 + * @run main/othervm -Djava.net.preferIPv6Addresses=true B6890349 * @summary Light weight HTTP server */ @@ -34,7 +36,11 @@ public static final void main(String[] args) throws Exception { try { - ServerSocket server = new ServerSocket (0); + ServerSocket server = new ServerSocket(); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, 0); + server.bind(address); + int port = server.getLocalPort(); System.out.println ("listening on " + port); B6890349 t = new B6890349 (server); @@ -44,11 +50,11 @@ port, "/foo\nbar"); System.out.println("URL: " + u); - HttpURLConnection urlc = (HttpURLConnection)u.openConnection (); + HttpURLConnection urlc = (HttpURLConnection)u.openConnection(Proxy.NO_PROXY); InputStream is = urlc.getInputStream(); throw new RuntimeException ("Test failed"); } catch (IOException e) { - System.out.println ("OK"); + System.out.println ("Caught expected exception: " + e); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B8012625.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B8012625.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/B8012625.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/B8012625.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -82,7 +82,8 @@ ExecutorService ex; public B8012625 () throws Exception { - server = HttpServer.create(new InetSocketAddress(0), 10); + InetAddress loopback = InetAddress.getLoopbackAddress(); + server = HttpServer.create(new InetSocketAddress(loopback, 0), 10); HttpContext ctx = server.createContext("/", this); ex = Executors.newFixedThreadPool(5); server.setExecutor(ex); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/BasicLongCredentials.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/BasicLongCredentials.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/BasicLongCredentials.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/BasicLongCredentials.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -26,6 +26,9 @@ * @bug 6947917 * @modules jdk.httpserver * @summary Error in basic authentication when user name and password are long + * @library /test/lib + * @run main BasicLongCredentials + * @run main/othervm -Djava.net.preferIPv6Addresses=true BasicLongCredentials */ import com.sun.net.httpserver.BasicAuthenticator; @@ -37,11 +40,15 @@ import java.io.InputStream; import java.io.IOException; import java.net.Authenticator; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.PasswordAuthentication; +import java.net.Proxy; import java.net.HttpURLConnection; import java.net.URL; +import jdk.test.lib.net.URIBuilder; + public class BasicLongCredentials { static final String USERNAME = "ThisIsMyReallyReallyReallyReallyReallyReally" + @@ -51,7 +58,8 @@ static final String REALM = "foobar@test.realm"; public static void main (String[] args) throws Exception { - HttpServer server = HttpServer.create(new InetSocketAddress(0), 0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + HttpServer server = HttpServer.create(new InetSocketAddress(loopback, 0), 0); try { Handler handler = new Handler(); HttpContext ctx = server.createContext("/test", handler); @@ -66,8 +74,13 @@ Authenticator.setDefault(new MyAuthenticator()); - URL url = new URL("http://localhost:"+server.getAddress().getPort()+"/test/"); - HttpURLConnection urlc = (HttpURLConnection)url.openConnection(); + URL url = URIBuilder.newBuilder() + .scheme("http") + .host(server.getAddress().getAddress()) + .port(server.getAddress().getPort()) + .path("/test/") + .toURL(); + HttpURLConnection urlc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); InputStream is = urlc.getInputStream(); int c = 0; while (is.read()!= -1) { c ++; } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/Finalizer.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/Finalizer.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/Finalizer.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/Finalizer.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, 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 @@ -80,8 +80,11 @@ public class Finalizer { public static void main (String args[]) { + ServerSocket serversocket = null; try { - ServerSocket serversocket = new ServerSocket (0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + serversocket = new ServerSocket(); + serversocket.bind(new InetSocketAddress(loopback, 0)); int port = serversocket.getLocalPort (); XServer server = new XServer (serversocket); server.start (); @@ -107,6 +110,10 @@ } catch (IOException e) { throw new RuntimeException("finalize method failure."+e); } catch (InterruptedException ie) { + } finally { + if (serversocket != null) { + try {serversocket.close();} catch (IOException io) {} + } } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/HttpInputStream.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/HttpInputStream.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/HttpInputStream.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/HttpInputStream.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -23,6 +23,7 @@ /* @test * @bug 4937598 + * @library /test/lib * @summary http://www.clipstream.com video does not play; read() problem */ @@ -30,10 +31,14 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.URL; +import jdk.test.lib.net.URIBuilder; + public class HttpInputStream { private static final int CONTENT_LENGTH = 20; @@ -45,7 +50,9 @@ static final int TIMEOUT = 10 * 1000; Server() throws IOException { - serverSocket = new ServerSocket(0); + serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0)); } void readOneRequest(InputStream is) throws IOException { @@ -106,7 +113,12 @@ public static void main(String args[]) throws IOException { try (Server server = new Server()) { (new Thread(server)).start(); - URL url = new URL("http://localhost:" + server.getPort() + "/anything"); + URL url = URIBuilder.newBuilder() + .scheme("http") + .loopback() + .port(server.getPort()) + .path("/anything") + .toURLUnchecked(); try (InputStream is = url.openConnection().getInputStream()) { if (read(is) != CONTENT_LENGTH) { throw new RuntimeException("HttpInputStream.read() failed with 0xff"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/HttpStreams.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/HttpStreams.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/HttpStreams.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/HttpStreams.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -24,6 +24,7 @@ /** * @test * @bug 8011719 + * @library /test/lib * @modules jdk.httpserver * @summary Basic checks to verify behavior of returned input streams */ @@ -36,6 +37,8 @@ import java.nio.charset.StandardCharsets; import java.util.*; +import jdk.test.lib.net.URIBuilder; + public class HttpStreams { void client(String u) throws Exception { @@ -56,24 +59,33 @@ expectThrow(() -> { is.read(ba, 0, 2); }, "read on closed stream should throw: " + u); } + String constructUrlString(int port, String path) throws Exception { + return URIBuilder.newBuilder() + .scheme("http") + .port(port) + .loopback() + .path(path) + .toURL().toString(); + } + void test() throws Exception { HttpServer server = null; try { server = startHttpServer(); - String baseUrl = "http://localhost:" + server.getAddress().getPort() + "/"; - client(baseUrl + "chunked/"); - client(baseUrl + "fixed/"); - client(baseUrl + "error/"); - client(baseUrl + "chunkedError/"); + int serverPort = server.getAddress().getPort(); + client(constructUrlString(serverPort, "/chunked/")); + client(constructUrlString(serverPort, "/fixed/")); + client(constructUrlString(serverPort, "/error/")); + client(constructUrlString(serverPort, "/chunkedError/")); // Test with a response cache ResponseCache ch = ResponseCache.getDefault(); ResponseCache.setDefault(new TrivialCacheHandler()); try { - client(baseUrl + "chunked/"); - client(baseUrl + "fixed/"); - client(baseUrl + "error/"); - client(baseUrl + "chunkedError/"); + client(constructUrlString(serverPort, "/chunked/")); + client(constructUrlString(serverPort, "/fixed/")); + client(constructUrlString(serverPort, "/error/")); + client(constructUrlString(serverPort, "/chunkedError/")); } finally { ResponseCache.setDefault(ch); } @@ -93,7 +105,8 @@ // HTTP Server HttpServer startHttpServer() throws IOException { - HttpServer httpServer = HttpServer.create(new InetSocketAddress(0), 0); + HttpServer httpServer = HttpServer.create(); + httpServer.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 0); httpServer.createContext("/chunked/", new ChunkedHandler()); httpServer.createContext("/fixed/", new FixedHandler()); httpServer.createContext("/error/", new ErrorHandler()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/Modified.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/Modified.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/Modified.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/Modified.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -24,12 +24,16 @@ /* * @test * @bug 4092605 + * @library /test/lib + * @run main/othervm Modified + * @run main/othervm -Djava.net.preferIPv6Addresses=true Modified * @summary Test HttpURLConnection setIfModifiedSince * */ import java.net.*; import java.io.*; +import jdk.test.lib.net.URIBuilder; public class Modified implements Runnable { @@ -78,13 +82,22 @@ Modified() throws Exception { - ss = new ServerSocket(0); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, 0); + ss = new ServerSocket(); + ss.bind(address); + int port = ss.getLocalPort(); + Thread thr = new Thread(this); thr.start(); - URL testURL = new URL("http://localhost:" + ss.getLocalPort() + - "/index.html"); - URLConnection URLConn = testURL.openConnection(); + URL testURL = URIBuilder.newBuilder() + .scheme("http") + .host(loopback) + .port(port) + .path("/index.html") + .toURL(); + URLConnection URLConn = testURL.openConnection(Proxy.NO_PROXY); HttpURLConnection httpConn; if (URLConn instanceof HttpURLConnection) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/NTLMTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/NTLMTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/NTLMTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/NTLMTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, 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 @@ -25,6 +25,7 @@ * @test * @bug 6520665 6357133 * @modules java.base/sun.net.www + * @library /test/lib * @run main/othervm NTLMTest * @summary 6520665 & 6357133: NTLM authentication issues. */ @@ -32,35 +33,41 @@ import java.net.*; import java.io.*; import sun.net.www.MessageHeader; +import jdk.test.lib.net.URIBuilder; public class NTLMTest { - public static void main(String[] args) { + public static void main(String[] args) throws Exception { Authenticator.setDefault(new NullAuthenticator()); try { - // Test with direct connection. - ServerSocket serverSS = new ServerSocket(0); - startServer(serverSS, false); - runClient(Proxy.NO_PROXY, serverSS.getLocalPort()); + InetAddress loopback = InetAddress.getLoopbackAddress(); + // Test with direct connection. + try (NTLMServer server = startServer(new ServerSocket(0, 0, loopback), false)) { + runClient(Proxy.NO_PROXY, server.getLocalPort()); + } // Test with proxy. - serverSS = new ServerSocket(0); - startServer(serverSS, true /*proxy*/); - SocketAddress proxyAddr = new InetSocketAddress("localhost", serverSS.getLocalPort()); - runClient(new Proxy(java.net.Proxy.Type.HTTP, proxyAddr), 8888); - + try (NTLMServer server = + startServer(new ServerSocket(0, 0, loopback), true /*proxy*/)) { + SocketAddress proxyAddr = new InetSocketAddress(loopback, server.getLocalPort()); + runClient(new Proxy(java.net.Proxy.Type.HTTP, proxyAddr), 8888); + } } catch (IOException e) { - e.printStackTrace(); + throw e; } } static void runClient(Proxy proxy, int serverPort) { try { - String urlStr = "http://localhost:" + serverPort + "/"; - URL url = new URL(urlStr); + URL url = URIBuilder.newBuilder() + .scheme("http") + .loopback() + .port(serverPort) + .path("/") + .toURLUnchecked(); HttpURLConnection uc = (HttpURLConnection) url.openConnection(proxy); - uc.getInputStream(); + uc.getInputStream().readAllBytes(); } catch (ProtocolException e) { /* java.net.ProtocolException: Server redirected too many times (20) */ @@ -70,6 +77,7 @@ * returned HTTP response code: 401 for URL: ..." */ //ioe.printStackTrace(); + System.out.println("Got expected " + ioe); } catch (NullPointerException npe) { throw new RuntimeException("Failed: NPE thrown ", npe); } @@ -93,34 +101,56 @@ "Content-Length: 0\r\n" + "Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAAAAACgAAAABggAAU3J2Tm9uY2UAAAAAAAAAAA==\r\n\r\n"}; - static void startServer(ServerSocket serverSS, boolean proxy) { - final ServerSocket ss = serverSS; - final boolean isProxy = proxy; - - Thread thread = new Thread(new Runnable() { - public void run() { - boolean doing2ndStageNTLM = false; - while (true) { - try { - Socket s = ss.accept(); - if (!doing2ndStageNTLM) { - handleConnection(s, isProxy ? proxyResp : serverResp, 0, 1); - doing2ndStageNTLM = true; - } else { - handleConnection(s, isProxy ? proxyResp : serverResp, 1, 2); - doing2ndStageNTLM = false; - } - connectionCount++; - //System.out.println("connectionCount = " + connectionCount); + static class NTLMServer extends Thread implements AutoCloseable { + final ServerSocket ss; + final boolean isProxy; + volatile boolean closed; + + NTLMServer(ServerSocket serverSS, boolean proxy) { + super(); + setDaemon(true); + ss = serverSS; + isProxy = proxy; + } + + public int getLocalPort() { return ss.getLocalPort(); } - } catch (IOException ioe) { - ioe.printStackTrace(); + @Override + public void run() { + boolean doing2ndStageNTLM = false; + while (!closed) { + try { + Socket s = ss.accept(); + if (!doing2ndStageNTLM) { + handleConnection(s, isProxy ? proxyResp : serverResp, 0, 1); + doing2ndStageNTLM = true; + } else { + handleConnection(s, isProxy ? proxyResp : serverResp, 1, 2); + doing2ndStageNTLM = false; } + connectionCount++; + //System.out.println("connectionCount = " + connectionCount); + } catch (IOException ioe) { + if (!closed) ioe.printStackTrace(); } - } }); - thread.setDaemon(true); - thread.start(); + } + } + + @Override + public void close() { + if (closed) return; + synchronized(this) { + if (closed) return; + closed = true; + } + try { ss.close(); } catch (IOException x) { }; + } + } + public static NTLMServer startServer(ServerSocket serverSS, boolean proxy) { + NTLMServer server = new NTLMServer(serverSS, proxy); + server.start(); + return server; } static int connectionCount = 0; diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -166,7 +166,8 @@ private static HttpServer getHttpServer(ExecutorService execs) throws Exception { - InetSocketAddress inetAddress = new InetSocketAddress(0); + InetSocketAddress inetAddress = new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0); HttpServer testServer = HttpServer.create(inetAddress, 15); int port = testServer.getAddress().getPort(); testServer.setExecutor(execs); @@ -181,7 +182,8 @@ ) throws Exception { - InetSocketAddress inetAddress = new InetSocketAddress(0); + InetSocketAddress inetAddress = new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0); HttpsServer testServer = HttpsServer.create(inetAddress, 15); int port = testServer.getAddress().getPort(); testServer.setExecutor(execs); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/ResponseCacheStream.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/ResponseCacheStream.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/ResponseCacheStream.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/ResponseCacheStream.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, 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 @@ -99,8 +99,9 @@ public static void main(String[] args) throws Exception { MyResponseCache cache = new MyResponseCache(); try { + InetAddress loopback = InetAddress.getLoopbackAddress(); ResponseCache.setDefault(cache); - server = new TestHttpServer (new ResponseCacheStream()); + server = new TestHttpServer (new ResponseCacheStream(), loopback, 0); System.out.println ("Server: listening on port: " + server.getLocalPort()); URL url = URIBuilder.newBuilder() .scheme("http") diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/SetChunkedStreamingMode.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/SetChunkedStreamingMode.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/SetChunkedStreamingMode.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/SetChunkedStreamingMode.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2019, 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 @@ -67,7 +67,8 @@ public static void main (String[] args) throws Exception { try { - server = new TestHttpServer (new SetChunkedStreamingMode(), 1, 10, 0); + server = new TestHttpServer(new SetChunkedStreamingMode(), 1, 10, + InetAddress.getLoopbackAddress(), 0); System.out.println ("Server: listening on port: " + server.getLocalPort()); URL url = URIBuilder.newBuilder() .scheme("http") diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/SetIfModifiedSince.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/SetIfModifiedSince.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/SetIfModifiedSince.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/SetIfModifiedSince.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, 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 @@ -22,13 +22,15 @@ */ /* @test - @bug 4213164 8172253 - @summary setIfModifiedSince mehtod in HttpURLConnection sometimes fails - */ + * @bug 4213164 8172253 + * @library /test/lib + * @summary setIfModifiedSince method in HttpURLConnection sometimes fails + */ import java.util.*; import java.io.*; import java.net.*; -import java.text.*; + +import jdk.test.lib.net.URIBuilder; public class SetIfModifiedSince implements Runnable { @@ -75,7 +77,8 @@ public SetIfModifiedSince() throws Exception { - serverSock = new ServerSocket(0); + serverSock = new ServerSocket(); + serverSock.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); int port = serverSock.getLocalPort(); Thread thr = new Thread(this); @@ -86,8 +89,12 @@ HttpURLConnection con; //url = new URL(args[0]); - url = new URL("http://localhost:" + String.valueOf(port) + - "/anything"); + url = URIBuilder.newBuilder() + .scheme("http") + .loopback() + .port(port) + .path("/anything") + .toURL(); con = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); con.setIfModifiedSince(date.getTime()); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/TunnelThroughProxy.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/TunnelThroughProxy.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/http/TunnelThroughProxy.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/http/TunnelThroughProxy.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2019, 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 diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -59,6 +59,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.net.Authenticator; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.PasswordAuthentication; import java.net.Proxy; @@ -80,6 +81,10 @@ public class ProxyAuthTest extends SSLSocketTemplate { private static boolean expectSuccess; + ProxyAuthTest() { + serverAddress = InetAddress.getLoopbackAddress(); + } + /* * Run the test case. */ @@ -143,18 +148,25 @@ */ HttpsURLConnection.setDefaultHostnameVerifier(new NameVerifier()); - InetSocketAddress paddr = - new InetSocketAddress("localhost", ps.getPort()); + InetSocketAddress paddr = InetSocketAddress + .createUnresolved(ps.getInetAddress().getHostAddress(), + ps.getPort()); Proxy proxy = new Proxy(Proxy.Type.HTTP, paddr); + InetAddress serverAddress = this.serverAddress; + String host = serverAddress == null + ? "localhost" + : serverAddress.getHostAddress(); + if (host.indexOf(':') > -1) host = "[" + host + "]"; URL url = new URL( - "https://" + "localhost:" + serverPort + "/index.html"); + "https://" + host + ":" + serverPort + "/index.html"); + System.out.println("URL: " + url); BufferedReader in = null; HttpsURLConnection uc = (HttpsURLConnection) url.openConnection(proxy); try { in = new BufferedReader(new InputStreamReader(uc.getInputStream())); String inputLine; - System.out.print("Client recieved from the server: "); + System.out.print("Client received from the server: "); while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } @@ -226,7 +238,8 @@ } private static ProxyTunnelServer setupProxy() throws IOException { - ProxyTunnelServer pserver = new ProxyTunnelServer(); + InetAddress loopback = InetAddress.getLoopbackAddress(); + ProxyTunnelServer pserver = new ProxyTunnelServer(loopback); /* * register a system wide authenticator and setup the proxy for diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyTunnelServer.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyTunnelServer.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyTunnelServer.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyTunnelServer.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -61,9 +61,14 @@ static boolean needAuth = false; public ProxyTunnelServer() throws IOException { + this(null); // use wildcard + } + + public ProxyTunnelServer(InetAddress proxyAddress) throws IOException { if (ss == null) { - ss = (ServerSocket) ServerSocketFactory.getDefault(). - createServerSocket(0); + ss = (ServerSocket) ServerSocketFactory.getDefault(). + createServerSocket(); + ss.bind(new InetSocketAddress(proxyAddress, 0)); } setDaemon(true); } @@ -274,9 +279,9 @@ serverName = connectInfo.substring(0, endi); serverPort = Integer.parseInt(connectInfo.substring(endi+1)); } catch (Exception e) { - throw new IOException("Proxy recieved a request: " - + connectStr); - } + throw new IOException("Proxy received a request: " + + connectStr, e); + } serverInetAddr = InetAddress.getByName(serverName); } @@ -284,6 +289,10 @@ return ss.getLocalPort(); } + public InetAddress getInetAddress() { + return ss.getInetAddress(); + } + /* * do "basic" authentication, authInfo is of the form: * Basic diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -42,7 +42,10 @@ import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; +import java.net.InetAddress; +import java.net.Proxy; import java.net.URL; +import java.net.UnknownHostException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; @@ -64,6 +67,10 @@ (new ServerIdentityTest()).run(); } + ServerIdentityTest() throws UnknownHostException { + serverAddress = InetAddress.getByName(hostname); + } + @Override protected boolean isCustomizedClientConnection() { return true; @@ -88,7 +95,7 @@ HttpURLConnection urlc = null; InputStream is = null; try { - urlc = (HttpURLConnection)url.openConnection(); + urlc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); is = urlc.getInputStream(); } finally { if (is != null) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/B6226610.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/B6226610.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/B6226610.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/B6226610.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, 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 @@ -47,12 +47,14 @@ proxy = new HeaderCheckerProxyTunnelServer(); proxy.start(); - String hostname = InetAddress.getLocalHost().getHostName(); + InetAddress localHost = InetAddress.getLocalHost(); + String hostname = localHost.getHostName(); + String hostAddress = localHost.getHostAddress(); try { URL u = new URL("https://" + hostname + "/"); System.out.println("Connecting to " + u); - InetSocketAddress proxyAddr = new InetSocketAddress(hostname, proxy.getLocalPort()); + InetSocketAddress proxyAddr = InetSocketAddress.createUnresolved(hostAddress, proxy.getLocalPort()); java.net.URLConnection c = u.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddr)); /* I want this header to go to the destination server only, protected @@ -96,7 +98,8 @@ public HeaderCheckerProxyTunnelServer() throws IOException { if (ss == null) { - ss = new ServerSocket(0); + ss = new ServerSocket(); + ss.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); } } @@ -143,16 +146,16 @@ retrieveConnectInfo(statusLine); if (mheader.findValue("X-TestHeader") != null) { - System.out.println("Proxy should not receive user defined headers for tunneled requests"); - failed = true; + System.out.println("Proxy should not receive user defined headers for tunneled requests"); + failed = true; } // 6973030 String value; if ((value = mheader.findValue("Proxy-Connection")) == null || !value.equals("keep-alive")) { - System.out.println("Proxy-Connection:keep-alive not being sent"); - failed = true; + System.out.println("Proxy-Connection:keep-alive not being sent"); + failed = true; } //This will allow the main thread to terminate without trying to perform the SSL handshake. @@ -206,8 +209,8 @@ serverPort = Integer.parseInt(connectInfo.substring(endi+1)); } catch (Exception e) { throw new IOException("Proxy recieved a request: " - + connectStr); - } + + connectStr, e); + } serverInetAddr = InetAddress.getByName(serverName); } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -24,6 +24,7 @@ /* @test * @bug 4696506 4942650 * @summary Unit test for java.net.CookieHandler + * @library /test/lib * @run main/othervm CookieHandlerTest * * SunJSSE does not support dynamic system properties, no way to re-use @@ -35,6 +36,7 @@ import java.util.*; import java.io.*; import javax.net.ssl.*; +import jdk.test.lib.net.URIBuilder; public class CookieHandlerTest { static Map cookies; @@ -78,10 +80,12 @@ * to avoid infinite hangs. */ void doServerSide() throws Exception { + InetAddress loopback = InetAddress.getLoopbackAddress(); SSLServerSocketFactory sslssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); SSLServerSocket sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(new InetSocketAddress(loopback, serverPort)); serverPort = sslServerSocket.getLocalPort(); /* @@ -151,8 +155,11 @@ } HttpsURLConnection http = null; /* establish http connection to server */ - String uri = "https://localhost:" + +serverPort ; - URL url = new URL(uri); + URL url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .toURL(); HttpsURLConnection.setDefaultHostnameVerifier(new NameVerifier()); http = (HttpsURLConnection)url.openConnection(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -651,8 +651,13 @@ serverModulus, serverPrivateExponent, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); + // doClientSide() connects to "localhost" + InetAddress localHost = InetAddress.getByName("localhost"); + InetSocketAddress address = new InetSocketAddress(localHost, serverPort); + sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); /* @@ -717,7 +722,7 @@ System.out.println("url is "+url.toString()); try { - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); System.out.println("respCode = "+respCode); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -26,7 +26,9 @@ * @bug 4423074 * @summary Need to rebase all the duplicated classes from Merlin. * This test will check out http POST + * @library /test/lib * @run main/othervm HttpsPost + * @run main/othervm -Djava.net.preferIPv6Addresses=true HttpsPost * * SunJSSE does not support dynamic system properties, no way to re-use * system properties in samevm/agentvm mode. @@ -35,6 +37,7 @@ import java.io.*; import java.net.*; import javax.net.ssl.*; +import jdk.test.lib.net.URIBuilder; public class HttpsPost { @@ -95,12 +98,16 @@ * to avoid infinite hangs. */ void doServerSide() throws Exception { + InetAddress loopback = InetAddress.getLoopbackAddress(); SSLServerSocketFactory sslssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); SSLServerSocket sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(serverPort, 0, loopback); serverPort = sslServerSocket.getLocalPort(); + System.out.println("Starting server at: " + + sslServerSocket.getInetAddress() + + ":" + serverPort); /* * Signal Client, we're ready for his connect. */ @@ -155,10 +162,15 @@ } // Send HTTP POST request to server - URL url = new URL("https://localhost:"+serverPort); + URL url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .toURL(); + System.out.println("Client connecting to: " + url); HttpsURLConnection.setDefaultHostnameVerifier(new NameVerifier()); - HttpsURLConnection http = (HttpsURLConnection)url.openConnection(); + HttpsURLConnection http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); http.setDoOutput(true); http.setRequestMethod("POST"); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsProxyStackOverflow.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsProxyStackOverflow.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsProxyStackOverflow.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/HttpsProxyStackOverflow.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2019, 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 @@ -34,6 +34,7 @@ import java.io.InputStream; import java.net.Authenticator; import java.net.Proxy; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.PasswordAuthentication; import java.net.ServerSocket; @@ -51,9 +52,11 @@ static void doClient(BadAuthProxyServer server) throws IOException { // url doesn't matter since we will never make the connection URL url = new URL("https://anythingwilldo/"); + InetAddress loopback = InetAddress.getLoopbackAddress(); + String loopbackAddress = loopback.getHostAddress(); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection( new Proxy(Proxy.Type.HTTP, - new InetSocketAddress("localhost", server.getPort()))); + InetSocketAddress.createUnresolved(loopbackAddress, server.getPort()))); try (InputStream is = conn.getInputStream()) { } catch(IOException unused) { // no real server, IOException is expected. @@ -70,8 +73,11 @@ return new PasswordAuthentication("xyz", "xyz".toCharArray()); } }); - - BadAuthProxyServer server = new BadAuthProxyServer(new ServerSocket(0)); + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, 0); + ServerSocket ss = new ServerSocket(); + ss.bind(address); + BadAuthProxyServer server = new BadAuthProxyServer(ss); Thread serverThread = new Thread(server); serverThread.start(); return server; @@ -113,4 +119,3 @@ } } } - diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -650,8 +650,13 @@ serverModulus, serverPrivateExponent, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); + // doClientSide() connects to the loopback address + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, serverPort); + sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); /* @@ -721,7 +726,7 @@ System.out.println("url is "+url.toString()); try { - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); System.out.println("respCode = " + respCode); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -654,8 +654,13 @@ serverModulus, serverPrivateExponent, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); + // doClientSide() connects to the loopback address + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, serverPort); + sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); /* @@ -725,7 +730,7 @@ System.out.println("url is "+url.toString()); try { - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); System.out.println("respCode = "+respCode); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java 2024-01-09 21:19:49.000000000 +0000 @@ -29,6 +29,7 @@ /* @test * @summary X509 certificate hostname checking is broken in JDK1.6.0_10 * @bug 6766775 + * @library /test/lib * @run main/othervm IPIdentities * @author Xuelei Fan */ @@ -45,6 +46,7 @@ import java.security.spec.*; import java.security.interfaces.*; import java.math.BigInteger; +import jdk.test.lib.net.URIBuilder; /* * Certificates and key used in the test. @@ -652,8 +654,13 @@ serverModulus, serverPrivateExponent, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); + // doClientSide() connects to the loopback address + InetAddress loopback = InetAddress.getLoopbackAddress(); + InetSocketAddress address = new InetSocketAddress(loopback, serverPort); + sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); /* @@ -713,11 +720,16 @@ HttpsURLConnection http = null; /* establish http connection to server */ - URL url = new URL("https://localhost:" + serverPort+"/"); + URL url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .path("/") + .toURL(); System.out.println("url is "+url.toString()); try { - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); System.out.println("respCode = "+respCode); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/Identities.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/Identities.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/Identities.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/Identities.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, 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 @@ -651,8 +651,13 @@ serverModulus, serverPrivateExponent, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); + // doClientSide() connects to "localhost" + InetAddress localHost = InetAddress.getByName("localhost"); + InetSocketAddress address = new InetSocketAddress(localHost, serverPort); + sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); /* @@ -717,7 +722,7 @@ System.out.println("url is "+url.toString()); try { - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); System.out.println("respCode = "+respCode); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, 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 @@ -95,6 +95,16 @@ * smart about it.... */ + private SSLServerSocket createServerSocket(SSLServerSocketFactory sslssf) + throws Exception { + SSLServerSocket sslServerSocket = + (SSLServerSocket)sslssf.createServerSocket(); + InetAddress localHost = InetAddress.getLocalHost(); + InetSocketAddress address = new InetSocketAddress(localHost, serverPort); + sslServerSocket.bind(address); + return sslServerSocket; + } + /* * Define the server side of the test. * @@ -104,8 +114,7 @@ private void doServerSide() throws Exception { SSLServerSocketFactory sslssf = (SSLServerSocketFactory)SSLServerSocketFactory.getDefault(); - try (SSLServerSocket sslServerSocket = - (SSLServerSocket)sslssf.createServerSocket(serverPort)) { + try (SSLServerSocket sslServerSocket = createServerSocket(sslssf)) { serverPort = sslServerSocket.getLocalPort(); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -27,8 +27,7 @@ import javax.net.*; import javax.net.ssl.*; -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.net.URIBuilder; /* * @test @@ -39,12 +38,6 @@ * that serves http POST method requests in secure channel, and a client * that makes https POST request through a proxy. * @library /test/lib - * @build jdk.test.lib.Utils - * jdk.test.lib.Asserts - * jdk.test.lib.JDKToolFinder - * jdk.test.lib.JDKToolLauncher - * jdk.test.lib.Platform - * jdk.test.lib.process.* * @compile OriginServer.java ProxyTunnelServer.java * @run main/othervm PostThruProxy */ @@ -62,6 +55,9 @@ static String passwd = "passphrase"; private static int serverPort = 0; + private static ProxyTunnelServer pserver; + private static TestServer server; + static final String RESPONSE_MSG = "Https POST thru proxy is successful"; /* * The TestServer implements a OriginServer that @@ -79,8 +75,7 @@ * @return bytes for the data in the response */ public byte[] getBytes() { - return "Https POST thru proxy is successful". - getBytes(); + return RESPONSE_MSG.getBytes(); } } @@ -88,6 +83,7 @@ * Main method to create the server and client */ public static void main(String args[]) throws Exception { + String keyFilename = TEST_SRC + "/" + pathToStores + "/" + keyStoreFile; String trustFilename = TEST_SRC + "/" + pathToStores + "/" + trustStoreFile; @@ -97,16 +93,18 @@ System.setProperty("javax.net.ssl.trustStore", trustFilename); System.setProperty("javax.net.ssl.trustStorePassword", passwd); + InetAddress loopback = InetAddress.getLoopbackAddress(); boolean useSSL = true; /* * setup the server */ try { ServerSocketFactory ssf = getServerSocketFactory(useSSL); - ServerSocket ss = ssf.createServerSocket(serverPort); + ServerSocket ss = ssf.createServerSocket(serverPort, 0, loopback); ss.setSoTimeout(TIMEOUT); // 30 seconds serverPort = ss.getLocalPort(); - new TestServer(ss); + server = new TestServer(ss); + System.out.println("Server started at: " + ss); } catch (Exception e) { System.out.println("Server side failed:" + e.getMessage()); @@ -120,6 +118,12 @@ e.getMessage()); throw e; } + long connectCount = pserver.getConnectCount(); + if (connectCount == 0) { + throw new AssertionError("Proxy was not used!"); + } else { + System.out.println("Proxy CONNECT count: " + connectCount); + } } private static ServerSocketFactory getServerSocketFactory @@ -162,9 +166,15 @@ */ HttpsURLConnection.setDefaultHostnameVerifier( new NameVerifier()); - URL url = new URL("https://" + getHostname() +":" + serverPort); + URL url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .toURL(); Proxy p = new Proxy(Proxy.Type.HTTP, pAddr); + System.out.println("Client connecting to: " + url); + System.out.println("Through proxy: " + pAddr); HttpsURLConnection https = (HttpsURLConnection)url.openConnection(p); https.setConnectTimeout(TIMEOUT); https.setReadTimeout(TIMEOUT); @@ -185,9 +195,15 @@ new InputStreamReader( https.getInputStream())); String inputLine; - while ((inputLine = in.readLine()) != null) + boolean msgFound = false; + while ((inputLine = in.readLine()) != null) { System.out.println("Client received: " + inputLine); + if (inputLine.contains(RESPONSE_MSG)) msgFound = true; + } in.close(); + if (!msgFound) { + throw new RuntimeException("POST message not found."); + } } catch (SSLException e) { if (ps != null) ps.close(); @@ -208,20 +224,13 @@ } static SocketAddress setupProxy() throws IOException { - ProxyTunnelServer pserver = new ProxyTunnelServer(); + InetAddress loopback = InetAddress.getLoopbackAddress(); + pserver = new ProxyTunnelServer(loopback); // disable proxy authentication pserver.needUserAuth(false); pserver.start(); - return new InetSocketAddress("localhost", pserver.getPort()); + return new InetSocketAddress(loopback, pserver.getPort()); } - private static String getHostname() { - try { - OutputAnalyzer oa = ProcessTools.executeCommand("hostname"); - return oa.getOutput().trim(); - } catch (Throwable e) { - throw new RuntimeException("Get hostname failed.", e); - } - } } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -29,6 +29,7 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.net.URIBuilder; /* * @test @@ -47,6 +48,8 @@ * jdk.test.lib.process.* * @compile OriginServer.java ProxyTunnelServer.java * @run main/othervm -Djdk.http.auth.tunneling.disabledSchemes= PostThruProxyWithAuth + * @run main/othervm -Djava.net.preferIPv6Addresses=true + -Djdk.http.auth.tunneling.disabledSchemes= PostThruProxyWithAuth */ public class PostThruProxyWithAuth { @@ -62,6 +65,11 @@ static String passwd = "passphrase"; volatile private static int serverPort = 0; + private static ProxyTunnelServer pserver; + private static TestServer server; + + static final String RESPONSE_MSG = + "Https POST thru proxy is successful with proxy authentication"; /* * The TestServer implements a OriginServer that @@ -79,9 +87,7 @@ * @return bytes for the data in the response */ public byte[] getBytes() { - return - "Https POST thru proxy is successful with proxy authentication". - getBytes(); + return RESPONSE_MSG.getBytes(); } } @@ -103,11 +109,13 @@ * setup the server */ try { + InetAddress localhost = InetAddress.getLocalHost(); ServerSocketFactory ssf = getServerSocketFactory(useSSL); - ServerSocket ss = ssf.createServerSocket(serverPort); + ServerSocket ss = ssf.createServerSocket(serverPort, 0, localhost); ss.setSoTimeout(TIMEOUT); // 30 seconds serverPort = ss.getLocalPort(); - new TestServer(ss); + server = new TestServer(ss); + System.out.println("Server started at: " + ss); } catch (Exception e) { System.out.println("Server side failed:" + e.getMessage()); @@ -120,7 +128,13 @@ System.out.println("Client side failed: " + e.getMessage()); throw e; - } + } + long connectCount = pserver.getConnectCount(); + if (connectCount == 0) { + throw new AssertionError("Proxy was not used!"); + } else { + System.out.println("Proxy CONNECT count: " + connectCount); + } } private static ServerSocketFactory getServerSocketFactory @@ -160,9 +174,16 @@ */ HttpsURLConnection.setDefaultHostnameVerifier( new NameVerifier()); - URL url = new URL("https://" + getHostname() + ":" + serverPort); + + URL url = URIBuilder.newBuilder() + .scheme("https") + .host(getHostname()) + .port(serverPort) + .toURL(); Proxy p = new Proxy(Proxy.Type.HTTP, pAddr); + System.out.println("Client connecting to: " + url); + System.out.println("Through proxy: " + pAddr); HttpsURLConnection https = (HttpsURLConnection)url.openConnection(p); https.setConnectTimeout(TIMEOUT); https.setReadTimeout(TIMEOUT); @@ -182,9 +203,15 @@ new InputStreamReader( https.getInputStream())); String inputLine; - while ((inputLine = in.readLine()) != null) - System.out.println("Client received: " + inputLine); + boolean msgFound = false; + while ((inputLine = in.readLine()) != null) { + System.out.println("Client received: " + inputLine); + if (inputLine.contains(RESPONSE_MSG)) msgFound = true; + } in.close(); + if (!msgFound) { + throw new RuntimeException("POST message not found."); + } } catch (SSLException e) { if (ps != null) ps.close(); @@ -202,7 +229,9 @@ } static SocketAddress setupProxy() throws IOException { - ProxyTunnelServer pserver = new ProxyTunnelServer(); + + InetAddress localhost = InetAddress.getLocalHost(); + pserver = new ProxyTunnelServer(localhost); /* * register a system wide authenticator and setup the proxy for @@ -216,7 +245,7 @@ pserver.start(); - return new InetSocketAddress("localhost", pserver.getPort()); + return new InetSocketAddress(localhost, pserver.getPort()); } public static class TestAuthenticator extends Authenticator { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ProxyTunnelServer.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ProxyTunnelServer.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ProxyTunnelServer.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/ProxyTunnelServer.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -63,11 +63,23 @@ */ static boolean needAuth = false; + volatile long connectCount; + public ProxyTunnelServer() throws IOException { if (ss == null) { ss = (ServerSocket) ServerSocketFactory.getDefault() .createServerSocket(0); ss.setSoTimeout(TIMEOUT); + System.out.println("Proxy server created: " + ss); + } + } + + public ProxyTunnelServer(InetAddress address) throws IOException { + if (ss == null) { + ss = (ServerSocket) ServerSocketFactory.getDefault() + .createServerSocket(0, 0, address); + ss.setSoTimeout(TIMEOUT); + System.out.println("Proxy server created: " + ss); } } @@ -86,7 +98,9 @@ public void run() { try { + System.out.println("Proxy server listening at: " + ss); clientSocket = ss.accept(); + System.out.println("Proxy server accepted connection: " + clientSocket); processRequests(); } catch (SocketTimeoutException e) { System.out.println( @@ -101,7 +115,9 @@ System.out.println("ProxyServer close error: " + excep); excep.printStackTrace(); } - } + } finally { + System.out.println("Proxy server: request served"); + } } /* @@ -118,6 +134,7 @@ String statusLine = mheader.getValue(0); if (statusLine.startsWith("CONNECT")) { + synchronized(this) { connectCount++; } // retrieve the host and port info from the status-line retrieveConnectInfo(statusLine); if (needAuth) { @@ -154,6 +171,10 @@ } } + public long getConnectCount() { + return connectCount; + } + private void respondForConnect(boolean needAuth) throws Exception { OutputStream out = clientSocket.getOutputStream(); @@ -273,13 +294,19 @@ endi = connectStr.lastIndexOf(' '); connectInfo = connectStr.substring(starti+1, endi).trim(); // retrieve server name and port - endi = connectInfo.indexOf(':'); - serverName = connectInfo.substring(0, endi); + if (connectInfo.charAt(0) == '[') { + endi = connectInfo.indexOf(']'); + serverName = connectInfo.substring(1, endi++); + assert connectInfo.charAt(endi) == ':' : "Expected [IPv6]:port"; + } else { + endi = connectInfo.indexOf(':'); + serverName = connectInfo.substring(0, endi); + } serverPort = Integer.parseInt(connectInfo.substring(endi+1)); } catch (Exception e) { throw new IOException("Proxy recieved a request: " + connectStr, e); - } + } serverInetAddr = InetAddress.getByName(serverName); } diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/RetryHttps.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/RetryHttps.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/RetryHttps.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/RetryHttps.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -24,7 +24,9 @@ /* @test * @bug 4799427 * @summary Https can not retry request + * @library /test/lib * @run main/othervm RetryHttps + * @run main/othervm -Djava.net.preferIPv6Addresses=true RetryHttps * * SunJSSE does not support dynamic system properties, no way to re-use * system properties in samevm/agentvm mode. @@ -35,6 +37,7 @@ import java.util.*; import java.io.*; import javax.net.ssl.*; +import jdk.test.lib.net.URIBuilder; public class RetryHttps { static Map cookies; @@ -80,12 +83,17 @@ * to avoid infinite hangs. */ void doServerSide() throws Exception { + InetAddress loopback = InetAddress.getLoopbackAddress(); SSLServerSocketFactory sslssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(serverPort, 0, loopback); serverPort = sslServerSocket.getLocalPort(); + System.out.println("Starting server at: " + + sslServerSocket.getInetAddress() + + ":" + serverPort); + /* * Signal Client, we're ready for his connect. */ @@ -145,11 +153,16 @@ try { HttpsURLConnection http = null; /* establish http connection to server */ - URL url = new URL("https://localhost:" + serverPort+"/file1"); + URL url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .path("/file1") + .toURL(); System.out.println("url is "+url.toString()); HttpsURLConnection.setDefaultHostnameVerifier( new NameVerifier()); - http = (HttpsURLConnection)url.openConnection(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); int respCode = http.getResponseCode(); int cl = http.getContentLength(); InputStream is = http.getInputStream (); @@ -157,8 +170,13 @@ while (is.read() != -1 && count++ < cl); System.out.println("respCode1 = "+respCode); Thread.sleep(2000); - url = new URL("https://localhost:" + serverPort+"/file2"); - http = (HttpsURLConnection)url.openConnection(); + url = URIBuilder.newBuilder() + .scheme("https") + .loopback() + .port(serverPort) + .path("/file2") + .toURL(); + http = (HttpsURLConnection)url.openConnection(Proxy.NO_PROXY); respCode = http.getResponseCode(); System.out.println("respCode2 = "+respCode); } catch (IOException ioex) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TunnelProxy.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TunnelProxy.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TunnelProxy.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TunnelProxy.java 2024-01-09 21:19:49.000000000 +0000 @@ -96,8 +96,29 @@ public TunnelProxy (int threads, int cperthread, int port) throws IOException { + this(threads, cperthread, null, 0); + } + + /** + * Create a TunnelProxy instance with the specified number + * of threads and maximum number of connections per thread and running on + * the specified port. The specified number of threads are created to + * handle incoming requests, and each thread is allowed + * to handle a number of simultaneous TCP connections. + * @param cb the callback object which is invoked to handle + * each incoming request + * @param threads the number of threads to create to handle + * requests in parallel + * @param cperthread the number of simultaneous TCP connections + * to handle per thread + * @param address the address to bind to. null means all addresses. + * @param port the port number to bind the server to. Zero + * means choose any free port. + */ + public TunnelProxy (int threads, int cperthread, InetAddress address, int port) + throws IOException { schan = ServerSocketChannel.open (); - InetSocketAddress addr = new InetSocketAddress (port); + InetSocketAddress addr = new InetSocketAddress (address, port); schan.socket().bind (addr); this.threads = threads; this.cperthread = cperthread; diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/NewImpl/JavaxHostnameVerifier.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/NewImpl/JavaxHostnameVerifier.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/https/NewImpl/JavaxHostnameVerifier.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/https/NewImpl/JavaxHostnameVerifier.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -135,8 +135,14 @@ SSLServerSocketFactory sslssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); + + // doClientSide() connects to "localhost" + InetAddress localHost = InetAddress.getByName("localhost"); + InetSocketAddress address = new InetSocketAddress(localHost, serverPort); + SSLServerSocket sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); + (SSLServerSocket) sslssf.createServerSocket(); + sslServerSocket.bind(address); serverPort = sslServerSocket.getLocalPort(); String ciphers[]= { "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA" }; @@ -205,7 +211,7 @@ URL url = new URL("https://" + "localhost:" + serverPort + "/etc/hosts"); - URLConnection urlc = url.openConnection(); + URLConnection urlc = url.openConnection(Proxy.NO_PROXY); if (!(urlc instanceof javax.net.ssl.HttpsURLConnection)) { throw new Exception( diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/jar/B4957695.java openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/jar/B4957695.java --- openjdk-lts-11.0.21+9/test/jdk/sun/net/www/protocol/jar/B4957695.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/net/www/protocol/jar/B4957695.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -96,7 +96,10 @@ public static void main (String[] args) throws Exception { String tmpdir = System.getProperty("java.io.tmpdir"); String[] list1 = listTmpFiles(tmpdir); - ServerSocket serverSocket = new ServerSocket(0); + InetAddress localHost = InetAddress.getByName("localhost"); + InetSocketAddress address = new InetSocketAddress(localHost, 0); + ServerSocket serverSocket = new ServerSocket(); + serverSocket.bind(address); server = new Server(serverSocket); server.start(); int port = serverSocket.getLocalPort(); @@ -108,7 +111,9 @@ read (is); is.close(); } catch (IOException e) { - System.out.println ("Received IOException as expected"); + System.out.println ("Received IOException as expected: " + e); + } finally { + try {serverSocket.close();} catch (IOException x) {} } String[] list2 = listTmpFiles(tmpdir); if (!sameList (list1, list2)) { diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java openjdk-lts-11.0.22+7/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java --- openjdk-lts-11.0.21+9/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java 2024-01-09 21:19:49.000000000 +0000 @@ -28,7 +28,7 @@ * 8209452 8209506 8210432 8195793 8216577 8222089 8222133 8222137 8222136 * 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321 8243320 * 8243559 8225072 8258630 8259312 8256421 8225081 8225082 8225083 8245654 - * 8305975 8304760 8307134 8295894 8314960 + * 8305975 8304760 8307134 8295894 8314960 8317373 8317374 8318759 8319187 * @summary Check root CA entries in cacerts file */ import java.io.ByteArrayInputStream; @@ -47,12 +47,12 @@ + File.separator + "security" + File.separator + "cacerts"; // The numbers of certs now. - private static final int COUNT = 97; + private static final int COUNT = 106; // SHA-256 of cacerts, can be generated with // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 private static final String CHECKSUM - = "88:72:92:56:FF:E5:A3:E4:39:98:6D:18:0B:BA:CC:0B:66:CB:1D:6D:52:CE:D7:C8:AD:63:B7:F1:5F:02:24:52"; + = "61:5F:6D:C5:9C:A3:8A:65:3F:CB:F9:F5:26:04:23:F4:53:A6:8C:B3:8B:2B:0A:F0:66:7D:9E:67:B9:4D:AC:B7"; // map of cert alias to SHA-256 fingerprint @SuppressWarnings("serial") private static final Map FINGERPRINT_MAP = new HashMap<>() { @@ -143,6 +143,8 @@ "5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE"); put("letsencryptisrgx1 [jdk]", "96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6"); + put("letsencryptisrgx2 [jdk]", + "69:72:9B:8E:15:A8:6E:FC:17:7A:57:AF:B7:17:1D:FC:64:AD:D2:8C:2F:CA:8C:F1:50:7E:34:45:3C:CB:14:70"); put("luxtrustglobalrootca [jdk]", "A1:B2:DB:EB:64:E7:06:C6:16:9E:3C:41:18:B2:3B:AA:09:01:8A:84:27:66:6D:8B:F0:E2:88:91:EC:05:19:50"); put("quovadisrootca [jdk]", @@ -157,6 +159,14 @@ "18:F1:FC:7F:20:5D:F8:AD:DD:EB:7F:E0:07:DD:57:E3:AF:37:5A:9C:4D:8D:73:54:6B:F4:F1:FE:D1:E1:8D:35"); put("quovadisrootca3g3 [jdk]", "88:EF:81:DE:20:2E:B0:18:45:2E:43:F8:64:72:5C:EA:5F:BD:1F:C2:D9:D2:05:73:07:09:C5:D8:B8:69:0F:46"); + put("digicertcseccrootg5 [jdk]", + "26:C5:6A:D2:20:8D:1E:9B:15:2F:66:85:3B:F4:79:7C:BE:B7:55:2C:1F:3F:47:72:51:E8:CB:1A:E7:E7:97:BF"); + put("digicertcsrsarootg5 [jdk]", + "73:53:B6:D6:C2:D6:DA:42:47:77:3F:3F:07:D0:75:DE:CB:51:34:21:2B:EA:D0:92:8E:F1:F4:61:15:26:09:41"); + put("digicerttlseccrootg5 [jdk]", + "01:8E:13:F0:77:25:32:CF:80:9B:D1:B1:72:81:86:72:83:FC:48:C6:E1:3B:E9:C6:98:12:85:4A:49:0C:1B:05"); + put("digicerttlsrsarootg5 [jdk]", + "37:1A:00:DC:05:33:B3:72:1A:7E:EB:40:E8:41:9E:70:79:9D:2B:0A:0F:2C:1D:80:69:31:65:F7:CE:C4:AD:75"); put("secomscrootca2 [jdk]", "51:3B:2C:EC:B8:10:D4:CD:E5:DD:85:39:1A:DF:C6:C2:DD:60:D8:7B:B7:36:D2:B5:21:48:4A:A4:7A:0E:BE:F6"); put("swisssigngoldg2ca [jdk]", @@ -251,6 +261,14 @@ "34:9D:FA:40:58:C5:E2:63:12:3B:39:8A:E7:95:57:3C:4E:13:13:C8:3F:E6:8F:93:55:6C:D5:E8:03:1B:3C:7D"); put("certignarootca [jdk]", "D4:8D:3D:23:EE:DB:50:A4:59:E5:51:97:60:1C:27:77:4B:9D:7B:18:C9:4D:5A:05:95:11:A1:02:50:B9:31:68"); + put("teliarootcav2 [jdk]", + "24:2B:69:74:2F:CB:1E:5B:2A:BF:98:89:8B:94:57:21:87:54:4E:5B:4D:99:11:78:65:73:62:1F:6A:74:B8:2C"); + put("emsignrootcag1 [jdk]", + "40:F6:AF:03:46:A9:9A:A1:CD:1D:55:5A:4E:9C:CE:62:C7:F9:63:46:03:EE:40:66:15:83:3D:C8:C8:D0:03:67"); + put("emsigneccrootcag3 [jdk]", + "86:A1:EC:BA:08:9C:4A:8D:3B:BE:27:34:C6:12:BA:34:1D:81:3E:04:3C:F9:E8:A8:62:CD:5C:57:A3:6B:BE:6B"); + put("emsignrootcag2 [jdk]", + "1A:A0:C2:70:9E:83:1B:D6:E3:B5:12:9A:00:BA:41:F7:EE:EF:02:08:72:F1:E6:50:4B:F0:F6:C3:F2:4F:3A:F3"); } }; diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/security/rsa/RSAPaddingCheck.java openjdk-lts-11.0.22+7/test/jdk/sun/security/rsa/RSAPaddingCheck.java --- openjdk-lts-11.0.21+9/test/jdk/sun/security/rsa/RSAPaddingCheck.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/security/rsa/RSAPaddingCheck.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/* + * @test + * @bug 8302017 + * @summary Ensure that RSAPadding class works as expected after refactoring + * @modules java.base/sun.security.rsa + */ +import java.util.Arrays; +import sun.security.rsa.RSAPadding; + +public class RSAPaddingCheck { + + private static int[] PADDING_TYPES = { + RSAPadding.PAD_BLOCKTYPE_1, + RSAPadding.PAD_BLOCKTYPE_2, + RSAPadding.PAD_NONE, + RSAPadding.PAD_OAEP_MGF1, + }; + + public static void main(String[] args) throws Exception { + int size = 2048 >> 3; + byte[] testData = "This is some random to-be-padded Data".getBytes(); + for (int type : PADDING_TYPES) { + byte[] data = (type == RSAPadding.PAD_NONE? + Arrays.copyOf(testData, size) : testData); + System.out.println("Testing PaddingType: " + type); + RSAPadding padding = RSAPadding.getInstance(type, size); + byte[] paddedData = padding.pad(data); + if (paddedData == null) { + throw new RuntimeException("Unexpected padding op failure!"); + } + + byte[] data2 = padding.unpad(paddedData); + if (data2 == null) { + throw new RuntimeException("Unexpected unpadding op failure!"); + } + if (!Arrays.equals(data, data2)) { + throw new RuntimeException("diff check failure!"); + } + } + } +} \ No newline at end of file diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/security/rsa/WithoutNULL.java openjdk-lts-11.0.22+7/test/jdk/sun/security/rsa/WithoutNULL.java --- openjdk-lts-11.0.21+9/test/jdk/sun/security/rsa/WithoutNULL.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/security/rsa/WithoutNULL.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2023, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8320597 + * @summary Verify RSA signature with omitted digest params (should be encoded as NULL) + * for backward compatibility + */ +import java.security.KeyFactory; +import java.security.Signature; +import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; + +public class WithoutNULL { + public static void main(String[] args) throws Exception { + + // A 1024-bit RSA public key + byte[] key = Base64.getMimeDecoder().decode( + "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrfTrEm4KvdFSpGAM7InrFEzALTKdphT9fK6Gu" + + "eVjHtKsuCSEaULCdjhJvPpFK40ONr1JEC1Ywp1UYrfBBdKunnbDZqNZL1cFv+IzF4Yj6JO6pOeHi" + + "1Zpur1GaQRRlYTvzmyWY/AATQDh8JfKObNnDVwXeezFODUG8h5+XL1ZXZQIDAQAB"); + + // A SHA1withRSA signature on an empty input where the digestAlgorithm + // inside DigestInfo does not have a parameters field. + byte[] sig = Base64.getMimeDecoder().decode( + "D1FpiT44WEXlDfYK880bdorLO+e9qJVXZWiBgqs9dfK7lYQwyEt9dL23mbUAKm5TVEj2ZxtHkEvk" + + "b8oaWkxk069jDTM1RhllPJZkAjeQRbw4gkg4N6wKZz9B/jdSRMNJg/b9QdRYZOHOBxsEHMbUREPV" + + "DoCOLaxB8eIXX0EWkiE="); + + Signature s = Signature.getInstance("SHA1withRSA", "SunRsaSign"); + s.initVerify(KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(key))); + if (!s.verify(sig)) { + throw new RuntimeException("Does not verify"); + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/security/ssl/ALPN/AlpnGreaseTest.java openjdk-lts-11.0.22+7/test/jdk/sun/security/ssl/ALPN/AlpnGreaseTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/security/ssl/ALPN/AlpnGreaseTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/security/ssl/ALPN/AlpnGreaseTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022, 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 @@ -83,7 +83,7 @@ new String(greaseBytes, StandardCharsets.ISO_8859_1); private static void findGreaseInClientHello(byte[] bytes) throws Exception { - for (int i = 0; i < bytes.length - greaseBytes.length; i++) { + for (int i = 0; i < bytes.length - greaseBytes.length + 1; i++) { if (Arrays.equals(bytes, i, i + greaseBytes.length, greaseBytes, 0, greaseBytes.length)) { System.out.println("Found greaseBytes in ClientHello at: " + i); diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java openjdk-lts-11.0.22+7/test/jdk/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java --- openjdk-lts-11.0.21+9/test/jdk/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2013, 2019, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.util.JarUtils; - -/** - * @test - * @bug 8024302 8026037 - * @summary Test for badKeyUsage warning - * @library /test/lib ../ - * @ignore until 8026393 is fixed - * @build jdk.test.lib.util.JarUtils - * @run main BadKeyUsageTest - */ -public class BadKeyUsageTest extends Test { - - /** - * The test signs and verifies a jar that contains entries - * whose signer certificate's KeyUsage extension - * doesn't allow code signing (badKeyUsage). - * Warning message is expected. - */ - public static void main(String[] args) throws Throwable { - BadKeyUsageTest test = new BadKeyUsageTest(); - test.start(); - } - - private void start() throws Throwable { - // create a jar file that contains one class file - Utils.createFiles(FIRST_FILE); - JarUtils.createJar(UNSIGNED_JARFILE, FIRST_FILE); - - // create a certificate whose signer certificate's KeyUsage extension - // doesn't allow code signing - createAlias(CA_KEY_ALIAS, "-ext", "bc:c"); - createAlias(KEY_ALIAS); - - issueCert( - KEY_ALIAS, - "-ext", "KeyUsage=keyAgreement", - "-validity", Integer.toString(VALIDITY)); - - // sign jar - OutputAnalyzer analyzer = jarsigner( - "-verbose", - "-keystore", KEYSTORE, - "-storepass", PASSWORD, - "-keypass", PASSWORD, - "-signedjar", SIGNED_JARFILE, - UNSIGNED_JARFILE, - KEY_ALIAS); - - checkSigning(analyzer, BAD_KEY_USAGE_SIGNING_WARNING); - - // verify signed jar - analyzer = jarsigner( - "-verify", - "-verbose", - "-keystore", KEYSTORE, - "-storepass", PASSWORD, - "-keypass", PASSWORD, - SIGNED_JARFILE); - - checkVerifying(analyzer, 0, BAD_KEY_USAGE_VERIFYING_WARNING); - - // verify signed jar in strict mode - analyzer = jarsigner( - "-verify", - "-verbose", - "-strict", - "-keystore", KEYSTORE, - "-storepass", PASSWORD, - "-keypass", PASSWORD, - SIGNED_JARFILE); - - checkVerifying(analyzer, BAD_KEY_USAGE_EXIT_CODE, - BAD_KEY_USAGE_VERIFYING_WARNING); - - System.out.println("Test passed"); - } - -} diff -Nru openjdk-lts-11.0.21+9/test/jdk/sun/tools/jcmd/TestJcmdSanity.java openjdk-lts-11.0.22+7/test/jdk/sun/tools/jcmd/TestJcmdSanity.java --- openjdk-lts-11.0.21+9/test/jdk/sun/tools/jcmd/TestJcmdSanity.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/jdk/sun/tools/jcmd/TestJcmdSanity.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, 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 @@ -32,6 +32,7 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.Platform; import jdk.test.lib.Utils; /* @@ -59,6 +60,7 @@ testJcmdPid_f(); testJcmdPidPerfCounterPrint(); testJcmdPidBigScript(); + testJcmdPidVMinfo(); } /** @@ -166,4 +168,21 @@ "The ouput should contain all content of " + path.toAbsolutePath()); } + /** + * Sanity check for VM.info + */ + private static void testJcmdPidVMinfo() throws Exception { + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, new String[] {"VM.info"}); + output.shouldHaveExitValue(0); + output.shouldContain(Long.toString(ProcessTools.getProcessId()) + ":"); + + // Should find the signal handler summary (except on Windows): + if (!Platform.isWindows()) { + output.shouldContain("Signal Handlers:"); + // Should not find any of the possible signal handler modification warnings: + output.shouldNotContain(" handler modified!"); // e.g. Warning: SIGILL handler modified! + output.shouldNotContain("*** Handler was modified!"); + output.shouldNotContain("*** Expected: "); // e.g. *** Expected: javaSignalHandler in ... + } + } } diff -Nru openjdk-lts-11.0.21+9/test/langtools/ProblemList.txt openjdk-lts-11.0.22+7/test/langtools/ProblemList.txt --- openjdk-lts-11.0.21+9/test/langtools/ProblemList.txt 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/langtools/ProblemList.txt 2024-01-09 21:19:49.000000000 +0000 @@ -60,7 +60,6 @@ # javap tools/javap/output/RepeatingTypeAnnotations.java 8057687 generic-all emit correct byte code an attributes for type annotations -tools/javap/T6587786.java 8195589 generic-all T6587786.java failed after JDK-8189997 ########################################################################### # diff -Nru openjdk-lts-11.0.21+9/test/langtools/jdk/jshell/HangingRemoteAgent.java openjdk-lts-11.0.22+7/test/langtools/jdk/jshell/HangingRemoteAgent.java --- openjdk-lts-11.0.21+9/test/langtools/jdk/jshell/HangingRemoteAgent.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/langtools/jdk/jshell/HangingRemoteAgent.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022, 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 @@ -30,12 +30,15 @@ import jdk.jshell.spi.ExecutionControlProvider; /** - * Hang for three minutes (long enough to cause a timeout). + * HangingRemoteAgent main() runs in its loop for 2X the timeout + * we give the launcher to fail to attach. */ class HangingRemoteAgent extends RemoteExecutionControl { - private static final long DELAY = 4000L; - private static final int TIMEOUT = 2000; + private static float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0")); + + private static final int TIMEOUT = (int)(2000 * timeoutFactor); + private static final long DELAY = TIMEOUT * 2L; private static final boolean INFRA_VERIFY = false; public static void main(String[] args) throws Exception { diff -Nru openjdk-lts-11.0.21+9/test/langtools/jdk/jshell/JdiHangingLaunchExecutionControlTest.java openjdk-lts-11.0.22+7/test/langtools/jdk/jshell/JdiHangingLaunchExecutionControlTest.java --- openjdk-lts-11.0.21+9/test/langtools/jdk/jshell/JdiHangingLaunchExecutionControlTest.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/langtools/jdk/jshell/JdiHangingLaunchExecutionControlTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8169519 + * @bug 8169519 8207166 * @summary Tests for JDI connector timeout failure * @modules jdk.jshell/jdk.jshell jdk.jshell/jdk.jshell.spi jdk.jshell/jdk.jshell.execution * @build HangingRemoteAgent diff -Nru openjdk-lts-11.0.21+9/test/langtools/tools/javac/inference_context_min/DontMinimizeInfContextTest.java openjdk-lts-11.0.22+7/test/langtools/tools/javac/inference_context_min/DontMinimizeInfContextTest.java --- openjdk-lts-11.0.21+9/test/langtools/tools/javac/inference_context_min/DontMinimizeInfContextTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/langtools/tools/javac/inference_context_min/DontMinimizeInfContextTest.java 2024-01-09 21:19:49.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2022, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8232933 + * @summary Javac inferred type does not conform to equality constraint + * @compile DontMinimizeInfContextTest.java + */ + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +class DontMinimizeInfContextTest { + void m() { + List> a = new LinkedList<>(); + Map>> b = a.stream().collect( + Collectors.groupingBy(A::getval, Collectors.toList()) + ); + } + + class A { + String getval() { + return "s"; + } + } +} diff -Nru openjdk-lts-11.0.21+9/test/langtools/tools/javap/T6587786.java openjdk-lts-11.0.22+7/test/langtools/tools/javap/T6587786.java --- openjdk-lts-11.0.21+9/test/langtools/tools/javap/T6587786.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/langtools/tools/javap/T6587786.java 2024-01-09 21:19:49.000000000 +0000 @@ -36,18 +36,21 @@ } public void run() throws IOException { - javap("com.sun.javadoc.Doc", "com.sun.crypto.provider.ai"); - javap("com.sun.crypto.provider.ai", "com.sun.javadoc.ClassDoc"); + javap("jdk.javadoc.doclet.Doclet", "java.util.List"); + javap("java.util.List", "jdk.javadoc.doclet.StandardDoclet"); } void javap(String... args) { StringWriter sw = new StringWriter(); PrintWriter out = new PrintWriter(sw); //sun.tools.javap.Main.entry(args); - int rc = com.sun.tools.javap.Main.run(args, out); - if (rc != 0) - throw new Error("javap failed. rc=" + rc); - out.close(); - System.out.println(sw.toString()); + try { + int rc = com.sun.tools.javap.Main.run(args, out); + if (rc != 0) + throw new Error("javap failed. rc=" + rc); + } finally { + out.close(); + System.out.println(sw.toString()); + } } } diff -Nru openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/Platform.java openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/Platform.java --- openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/Platform.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/Platform.java 2024-01-09 21:19:49.000000000 +0000 @@ -82,7 +82,7 @@ } public static boolean isTieredSupported() { - return compiler.contains("Tiered Compilers"); + return (compiler != null) && compiler.contains("Tiered Compilers"); } public static boolean isInt() { diff -Nru openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/cds/CDSTestUtils.java openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/cds/CDSTestUtils.java --- openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2024-01-09 21:19:49.000000000 +0000 @@ -558,8 +558,12 @@ // ============================= Logging public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception { + return executeAndLog(pb.start(), logName); + } + + public static OutputAnalyzer executeAndLog(Process process, String logName) throws Exception { long started = System.currentTimeMillis(); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); + OutputAnalyzer output = new OutputAnalyzer(process); writeFile(getOutputFile(logName + ".stdout"), output.getStdout()); writeFile(getOutputFile(logName + ".stderr"), output.getStderr()); diff -Nru openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/jfr/EventNames.java openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/jfr/EventNames.java --- openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/jfr/EventNames.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/jfr/EventNames.java 2024-01-09 21:19:49.000000000 +0000 @@ -175,6 +175,7 @@ public final static String X509Certificate = PREFIX + "X509Certificate"; public final static String X509Validation = PREFIX + "X509Validation"; public final static String SecurityProperty = PREFIX + "SecurityPropertyModification"; + public final static String SecurityProviderService = PREFIX + "SecurityProviderService"; public final static String Deserialization = PREFIX + "Deserialization"; // Flight Recorder diff -Nru openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/util/JarUtils.java openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/util/JarUtils.java --- openjdk-lts-11.0.21+9/test/lib/jdk/test/lib/util/JarUtils.java 2023-10-06 05:33:33.000000000 +0000 +++ openjdk-lts-11.0.22+7/test/lib/jdk/test/lib/util/JarUtils.java 2024-01-09 21:19:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -157,7 +157,7 @@ while (jentries.hasMoreElements()) { JarEntry jentry = jentries.nextElement(); if (!names.contains(jentry.getName())) { - jos.putNextEntry(jentry); + jos.putNextEntry(copyEntry(jentry)); jf.getInputStream(jentry).transferTo(jos); } } @@ -289,7 +289,7 @@ changes.remove(name); } else { System.out.println(String.format("- Copy %s", name)); - jos.putNextEntry(entry); + jos.putNextEntry(copyEntry(entry)); srcJarFile.getInputStream(entry).transferTo(jos); } } @@ -359,4 +359,17 @@ } return entries; } + + private static JarEntry copyEntry(JarEntry e1) { + JarEntry e2 = new JarEntry(e1.getName()); + e2.setMethod(e1.getMethod()); + e2.setTime(e1.getTime()); + e2.setComment(e1.getComment()); + e2.setExtra(e1.getExtra()); + if (e1.getMethod() == JarEntry.STORED) { + e2.setSize(e1.getSize()); + e2.setCrc(e1.getCrc()); + } + return e2; + } }